Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1055265
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T17:32:10+00:00 2026-05-16T17:32:10+00:00

I have the following ASP.NET code: <div id=panelIssue runat=server style=width: 450px; height: 320px;> <gsl:IssueUC

  • 0

I have the following ASP.NET code:

<div id="panelIssue" runat="server" style="width: 450px; height: 320px;">
    <gsl:IssueUC ID="ucIssue" runat="server" 
        OnItemSaved="ucIssue_ItemSaved" 
        OnItemCancelled="ucIssue_ItemCancelled" />
</div>

and then have an asp:Button on the page that simply call some methods and set some properties of the custom user control like

protected void btnNewIssue_Click(object sender, EventArgs e) {
    ucIssue.ChangePanelMode(PanelModeEnum.Add);
    ucIssue.FirmID = Convert.ToInt32(Page.Session["FirmID"]);
    ucIssue.loadObject();
}

I know that I can use the div to show a jquery modal dialog but the question is how to set the usercontrol properties and call their methods?
I can evaluate also a different approach (e.g. changing the usercontrol).

Thanks in advance
Lorenzo

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T17:32:10+00:00Added an answer on May 16, 2026 at 5:32 pm

    What I can suggest is that in the click event, after setting the control properties, you can emit a piece of javascript that will create and display a modal when the page finishes loading upon reaching the client.

    Try something along the lines of the following snippet (not tested, may need small tweaking to work, but I hope you get the big idea):

    protected void btnNewIssue_Click(object sender, EventArgs e) {
        ucIssue.ChangePanelMode(PanelModeEnum.Add);
        ucIssue.FirmID = Convert.ToInt32(Page.Session["FirmID"]);
        ucIssue.loadObject();
    
        //emit client script that will create and show the modal dialog
        ClientScriptManager clientScriptManager = Page.ClientScript;
        string scriptText = "$(document).ready(\n" +
                                "function() {\n" +
                                    "$('#panelIssue').dialog({\n" +
                                        "autoOpen: false,\n" +
                                        "modal: true,\n" +
                                        "width: 450,\n" +
                                        "height: 320,\n" +
                                        "title: \"Some title\",\n" +
                                        "resizable: false,\n" +
                                        "draggable: false });\n" +
                                    "$('#panelIssue').dialog('open');\n" +
                                "});";
        clientScriptManager.RegisterClientScriptBlock(this.GetType(), "MyScript", scriptText, true);
    }
    

    You should also look at the capabilities of the dialog creation in jQuery to see what other settings will fit your scenario better. I just used a few of the params that I have in an example of mine.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code in a ASP.NET master page: <div id=hyperlinkimage><asp:HyperLink ID=SomeHyperLink runat=Server
In an ASP.NET project I have the following HTML: <asp:PlaceHolder ID=plcTitle runat=server></asp:PlaceHolder> <div id=divStrapline
Take following example of code: (ASP.NET WebForms) <asp:Content ContentPlaceHolderID=Contents runat=server> <div class=blogpost-list> <asp:Repeater ID=blogList
I have the following HTML code: <div style=background-image:url(~/Images/MyImage.jpg); width:100%; height:100%> I'm not too familiar
I have constructed an ASP.NET user control Box.ascx wtih the following code. <div id=divContent
I have following asp.net code but it gives error when I change dropdown selected
I have ASP.Net code similar to the following (this is inside a FIELDSET): <ol>
Anything I have tried didn't work. Currenly I have following code to change asp.net
I have the following code inside my asp.net-mvc project: private string GenerateEmail(RequestContext requestContext) {
I have the following code in my ASP.NET project public sealed class IoC {

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.