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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T15:23:17+00:00 2026-06-11T15:23:17+00:00

I am using a modal popup extender which contains a panel having three textboxes

  • 0

I am using a modal popup extender which contains a panel having three textboxes and two buttons. I want to fill the textbox values with my specifications (the date selected)..but not getting it successfully.

protected void myCal_SelectionChanged(object sender, EventArgs e)
    {
        ModalPopupExtender1.Show();
        TextBoxStart.Text = myCal.SelectedDate.ToString();
        TextBoxEnd.Text = myCal.SelectedDate.ToString();
    }

Designer is

<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="false">

  <ContentTemplate>        
      <asp:Calendar ID="myCal" runat="server" Height="600px" width="900px" 
        BorderColor="#F2F3F4" BorderWidth="3px" DayStyle-BorderWidth="1px" 
                TodayDayStyle-BackColor="#82CAFF" NextPrevFormat="ShortMonth" 
        SelectionMode="Day" DayHeaderStyle-Height="30px" 
                TitleStyle-BackColor="#CBE3F0" TitleStyle-ForeColor="#153E7E" 
        OtherMonthDayStyle-ForeColor="#B4CFEC" NextPrevStyle-ForeColor="#2554C7" 
        CssClass="mGrid" onselectionchanged="myCal_SelectionChanged">
        <DayHeaderStyle Height="30px" /><TitleStyle Height="50px" />
        <DayStyle BorderWidth="1px" HorizontalAlign="Left" VerticalAlign="Top" />
        <TodayDayStyle BackColor="#CBE3F0" />
    </asp:Calendar>

      <ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="ButtonDummy" PopupControlID="pnlSelect">

      </ajaxToolkit:ModalPopupExtender>

</ContentTemplate>

      </asp:UpdatePanel>


    <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Always">
<ContentTemplate>

       <asp:Panel ID="pnlSelect" runat="server" width="200px" Height="200px">

           <table border="0" cellspacing="6" cellpadding="0" style="background-color: white">
               <tr>
                   <td align="right"></td>
                   <td>
                       <h2>New Appointment</h2>
                   </td>
               </tr>
               <tr>
                   <td align="right">Start Date:</td>
                   <td>
                       <asp:TextBox ID="TextBoxStart" runat="server"></asp:TextBox></td>
               </tr>
               <tr>
                   <td align="right">End Date:</td>
                   <td>
                       <asp:TextBox ID="TextBoxEnd" runat="server"></asp:TextBox></td>
               </tr>
               <tr>
                   <td align="right">Name:</td>
                   <td>
                       <asp:TextBox ID="TextBoxName" runat="server"></asp:TextBox></td>
               </tr>
               <tr>
                   <td align="right"></td>
                   <td>
                       <asp:Button ID="ButtonOK" runat="server" OnClick="ButtonOK_Click" Text="OK" />
                       <asp:Button ID="ButtonCancel" runat="server" Text="Cancel" OnClick="ButtonCancel_Click" />
                   </td>
               </tr>
           </table>

       </asp:Panel>
    </ContentTemplate>

What can be wrong?

  • 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-11T15:23:19+00:00Added an answer on June 11, 2026 at 3:23 pm

    As these textboxes placed out of UpdatePanel they are not updated on async request. Place them into the same UpdatePanel or wrap by another one UpdatePanel and set UpdateMode to “Always” like below:

    <asp:UpdatePanel runat="server" UpdateMode="Always">
        <ContentTemplate>
            <asp:Panel runat="server" ID="pnlSelect" >
                <asp:TextBox runat="server" ID="TextBoxStart" />
                <asp:TextBox runat="server" ID="TextBoxEnd" />
            </asp:Panel>
        </ContentTemplate>
    </asp:UpdatePanel>
    

    Try to set ChildrenAsTriggers property of the UpdatePanel1 to true or move ModalPopupExtender1 to UpdatePanel2.

    Also, you can move PopupExtender and his target dummy button out of the UpdatePanel1 and swap pnlSelect with UpdatePanel2:

    <asp:UpdatePanel runat="server" ID="UpdatePanel1" UpdateMode="Conditional" ChildrenAsTriggers="false">
        <ContentTemplate>
            <asp:Button ID="Button1" runat="server" Text="Click Me" />
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:Button ID="ButtonDummy" runat="server" Style="display: none" />
    <ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="ButtonDummy"
        PopupControlID="pnlSelect" BackgroundCssClass="modalBackground" />
    <asp:Panel ID="pnlSelect" runat="server" Style="display: none" CssClass="modalPopup">
        <asp:UpdatePanel runat="server" ID="UpdatePanel2" UpdateMode="Always">
            <ContentTemplate>
                <asp:TextBox runat="server" ID="TextBoxStart" />
            </ContentTemplate>
        </asp:UpdatePanel>
    </asp:Panel>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a asp Panel that opens as a Modal Popup window using ajax.
I am using a modal popup that contains a dropdown box. When the dropdown
I have inherited some code using an ASP modal popup extender and for some
I've got a modal popup (using ModalPopupExtender) working in a kind of master/detail view
I am using AJAX modal popup in my project, but there is problem with
I am using jquery modal popup in my application with MVC3 Razor view. Issue
I'm using ajax requests to populate modal popup windows with data that users have
I am using plugin simple modal for showing popup in my site . I
I'm using simplemodal to popup a modal window. I've tested the modal window functionality
I want to use multiple targets with my ModalPopUp extender. One of my buttons

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.