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 am using ASP.NET MVC 3 with the razor view engine. I have the
I have an existing asp.net web app that uses facebook to authenticate users. I
I have a simple ASP.NET page that uses the VLC media player to play
I have a lot of content-heavy views in my ASP.NET MVC 2 site. These
I am using Microsoft visual basic 2010 for a asp.net site using c#. I
I have a page where I wish to render the following html (a small
How can I create a form in ASP.NET MVC2, send the data to a
Why must IE be so difficult? Building site on ASP.NET MVC platform. Email page
What areas get affected by it? code readability? maintainability? performance? security? any other? my
I am trying to figure out how to accomplish the following: Handle client-side click

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.