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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T23:11:35+00:00 2026-05-23T23:11:35+00:00

<ajaxToolkit:ModalPopupExtender runat=server id=ModalPopupExtender1 cancelcontrolid=btnCancel okcontrolid=btnOkay targetcontrolid=Button1 popupcontrolid=Panel1 drag=true backgroundcssclass=ModalPopupBG /> <asp:Button ID=Button1 runat=server Text=Test

  • 0
<ajaxToolkit:ModalPopupExtender  runat="server" 
         id="ModalPopupExtender1"
         cancelcontrolid="btnCancel" okcontrolid="btnOkay" 
         targetcontrolid="Button1" popupcontrolid="Panel1" 
         drag="true" 
         backgroundcssclass="ModalPopupBG"
        />

<asp:Button ID="Button1" runat="server" Text="Test Modal Popup" 
    onclick="Button1_Click" />
    <br />

<asp:UpdatePanel ID="up" runat="server">
    <ContentTemplate>
        <asp:Button ID="Button2" runat="server" Text="Post Back" 
        onclick="Button2_Click" />
        <asp:Label ID="Label1" runat="server" AutoPostBack="true" Text="Nothing has happened yet..."></asp:Label>

        <asp:Panel ID="Panel1" runat="server" AutoPostBack="true">
            <div class="HellowWorldPopup">
                <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                <asp:Button ID="btnCancel" runat="server" Text="Canel" 
                    onclick="btnCancel_Click" />
                <asp:Button ID="btnOkay" runat="server" Text="Okay" onclick="btnOkay_Click" />
            </div>
        </asp:Panel>

    </ContentTemplate>
</asp:UpdatePanel>

So I am trying to get the Label to have the contents of what the user typed in the textbox inside the modal popup. Right now the btnOkay is not causing this to work.

.cs file:

protected void btnCancel_Click(object sender, EventArgs e)
{
    TextBox1.Text = "";
}
protected void btnOkay_Click(object sender, EventArgs e)
{
    Label1.Text = TextBox1.Text;
    TextBox1.AutoPostBack = true;
}
protected void Button1_Click(object sender, EventArgs e)
{
    Label1.Text = "";
    TextBox1.Text = "";
}
protected void Button2_Click(object sender, EventArgs e)
{
    Label1.Text = "You clicked the button";
}

I do not want the page to post back at all, but just to update the hidden labels on the page once information is entered. How do I do this?

  • 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-23T23:11:36+00:00Added an answer on May 23, 2026 at 11:11 pm

    Edit:
    Alright, this should do the trick I think.

    <ajax:ModalPopupExtender runat="server" id="ModalPopupExtender1" targetcontrolid="Button1"
        popupcontrolid="Panel1" drag="true" backgroundcssclass="ModalPopupBG"  />
    <asp:Button ID="Button1" runat="server" Text="Test Modal Popup" /><br />
    <asp:Panel ID="Panel1" runat="server">
        <div class="HellowWorldPopup">
            <asp:TextBox ID="TextBox1" runat="server" />
            <asp:Button ID="btnCancel" runat="server" Text="Canel" onclick="btnCancel_Click" />
            <asp:Button ID="btnOkay" runat="server" Text="Okay" onclick="btnOkay_Click" />
        </div>
    </asp:Panel>
    
    <asp:UpdatePanel ID="up" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <asp:Label ID="Label1" runat="server" Text="Nothing has happened yet..." />
        </ContentTemplate>
    </asp:UpdatePanel>
    

    .

    protected void btnCancel_Click(object sender, EventArgs e)
    {
        TextBox1.Text = ""; 
    }
    
    protected void btnOkay_Click(object sender, EventArgs e)
    {
        Label1.Text = TextBox1.Text;
        up.Update();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

<asp:TextBox ID=TextBox5 runat=server Height=30px Width=68px></asp:TextBox> <ajaxToolkit:DropDownExtender ID=TextBox5_DropDownExtender runat=server DynamicServicePath= Enabled=True TargetControlID=TextBox5> </ajaxToolkit:DropDownExtender> //this.TextBox5_DropDownExtender ????
<ajaxtoolkit:AccordionPane ID=accordianPaneAroundTheCheckbox runat=server> <Content> <asp:UpdatePanel ID=updatePanelAroundTheCheckbox runat=server > <ContentTemplate> <div> <asp:CheckBox ID=chkFoo AutoPostBack=true runat=server
I'm trying to use the AjaxToolkit's ModalPopupExtender, but it doesn't work. In fact, as
Can I make ComboBox from AjaxToolkit make call to server every time new letter
I tried using this example: http://www.asp.net/ajaxlibrary/AjaxControlToolkitSampleSite/modalpopup/modalpopup.aspx <ajaxToolkit:ModalPopupExtender ID=MPE runat=server TargetControlID=LinkButton1 </ajaxToolkit:ModalPopupExtender> And try using
I am developing a site using ASP.NET 2.0. AjaxToolKit's ModalPopupExtender is being used to
I am using c#, Microsoft AjaxToolKit. I am using ajaxToolkit:ModalPopupExtender for the login page,
I have user control which looks like <div> <asp:LinkButton ID=btnShow runat=server Text=Select CausesValidation=false />
ajaxtoolkit ReorderList is not working in IE 8.Can not drag it in IE 8.But
I'd like to use an ajaxToolkit:CalendarExtender on an asp:Label. When I attach a CalendarExtender

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.