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 7890609
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T06:23:57+00:00 2026-06-03T06:23:57+00:00

I have 2 updatepanels, and the first one came along with link button to

  • 0

I have 2 updatepanels, and the first one came along with link button to open modal popup, I realized that those validator must be set to enabled to false, before it can popup. The 2nd updatepanel came along with panel and those button cancel and button confirm. Before autopostback, everything work properly. But I wonder why after autopostback, then the cancel button cant even close the modal popup anymore, and also the confirm button does not work anymore.

<asp:UpdatePanel ID="uptbl" UpdateMode="Conditional" runat="server">
<ContentTemplate>
<asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder>
<asp:ModalPopupExtender ID="mpe" runat="server"
        TargetControlID="btnDummy"
        PopupControlID="UpdatePanel1"
        BackgroundCssClass="modalBackground"
        OkControlID="btnDummy"
        CancelControlID="Button2"
        BehaviorID="mpeBehavior" />
<input id="btnDummy" runat="server" type="button" style="display: none;" />

</ContentTemplate>
</asp:UpdatePanel>


<asp:UpdatePanel ID="UpdatePanel1" UpdateMode="Conditional" runat="server">
<ContentTemplate>
<asp:DropDownList ID="ddlLength" runat="server" AutoPostBack="true" onselectedindexchanged="ddlLength_SelectedIndexChanged">
<asp:ListItem>---Select Minutes---</asp:ListItem>
<asp:ListItem Value="60">60</asp:ListItem>
<asp:ListItem Value="120">120</asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" InitialValue="---Select Minutes---" 
                                 runat="server" ErrorMessage="Minutes is required!"
                                 ControlToValidate="ddlLength" Display="Dynamic"
                                 CssClass="error" Enabled="false" ValidationGroup="reserve">
                                 </asp:RequiredFieldValidator>
<asp:Button ID="btnConfirm" runat="server" Text="Confirm" OnClick="btnConfirm_Click" ValidationGroup="reserve"/>
<asp:Button ID="Button2" runat="server" Text="Cancel" CausesValidation="false" OnClick="btnCancel_Click" />

public void DynamicClick(object sender, EventArgs e)
{
UpdatePanel1.Update(); 
mpe.Show();
RequiredFieldValidator2.Enabled = true;
}
    public void btnCancel_Click(object sender, EventArgs e)
    {
        mpe.Hide();
        RequiredFieldValidator2.Enabled = false;
    }

protected void ddlLength_SelectedIndexChanged(object sender, EventArgs e)
    {
        int length = 0, unit = 0;
        if (ddlLength.SelectedIndex != 0)
        {
            length = Convert.ToInt32(ddlLength.SelectedItem.Value);
            unit = length / 60;
        }

        RequiredFieldValidator1.Enabled = true;
        RequiredFieldValidator2.Enabled = true;
        Button2.CausesValidation = false;
    }
  • 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-06-03T06:23:58+00:00Added an answer on June 3, 2026 at 6:23 am

    Please put below code on drop down server side change event

    modalpopup.show(); updatepanel.update();
    

    where modalpopup is “ID” of modalpopupextender and updatepanel is “ID” of updatepanel

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

Sidebar

Related Questions

In my application I have updatepanel with few buttons. One of those button is
I have an ASP.Net 2.0 page that contains two UpdatePanels. The first panel contains
I have two updatepanels inside an accordion control, laid out like this: <accordion> <first
I have an updatepanel which after clicking one button is submitting the page. The
I have a page that uses multiple UpdatePanels and a MasterPage. Upon switching my
Say I have 2 UpdatePanels on the page and each UpdatePanel has a one
We have an issue on our page whereby the first time a button posts
I have a form which I load within a modal window in that from
I have got a grid[Grid1] that build its dataRows when a button[search] is clicked,
I have two update panels on my page. The first has a form that

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.