Click here to Skip to main content
15,915,611 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I have a popup that contains a dropdown list and few textboxes. When I click the dropdown it should populate the textboxes inside the popup but the popup disapears.
How can i solve this by not making my dropdown to be AutopostBack false?

Below is my panel with dropdown and textbox.

XML
<asp:Panel ID="PNL" runat="server" style="display:none; width:900px; background-color:White; border-width:2px; border-color:Black; border-style:solid; padding:20px; ">
                    <%-- Form to finalize appointment--%>

  <table id="Table1" runat="server">
   <tr>
   <td>
   Select Patient
   </td>
    <td style="width: 166px">
        <asp:DropDownList ID="ddlPatientID" runat="server"
            AutoPostBack="true"
              onselectedindexchanged="ddlPatientID_SelectedIndexChanged"
            ForeColor="Black"   height="22px" Width="162px"
            style="border:1px inset black" >

        </asp:DropDownList>
   </td>
   </tr>
       <tr>
           <td>
               Name</td>
           <td style="width: 166px">
               <asp:TextBox ID="txtViewPatientName" runat="server"
                   ForeColor="Black" ReadOnly="True" CssClass="textbox"></asp:TextBox>
           </td>



Below I have a column that is inside gridview. When I click the LinkButton, the Panel with the dropdown and textbox will apear.

XML
<Columns >

             <asp:TemplateField HeaderText="Create Appointment">

           <ItemTemplate>
               <asp:LinkButton ID="createAppointment" runat="server"  OnClick="createAppointment_Click" OnClientClick='<%# "frmFindAppointment.aspx?Fullname=" + HttpUtility.UrlEncode(Eval("Fullname").ToString())+"&RecordNumber="+ HttpUtility.UrlEncode(Eval("RecordNumber").ToString())+"&Date="+  HttpUtility.UrlEncode(Eval("Date").ToString())+"&SlotID="+ HttpUtility.UrlEncode(Eval("SlotID").ToString())+"&Timeslot="+ HttpUtility.UrlEncode(Eval("Timeslot").ToString())  %>' Text="Create Appointment" />
            <ajaxToolkit:ConfirmButtonExtender ID="ConfirmButtonExtender2"  runat="server"
                       TargetControlID="createAppointment"
                        DisplayModalPopupID="ModalPopupExtender1" />
           <ajaxToolkit:ModalPopupExtender  BackgroundCssClass="modalBackground" ID="ModalPopupExtender1" runat="server" TargetControlID="createAppointment" PopupControlID="PNL" OkControlID="ButtonOk" EnableViewState="false" />


           </ItemTemplate>
       </asp:TemplateField>

              </Columns>



Now when I select an option in my dropdown,the popup disapears, and i want it to stand still, how can i make it stand stil?
Posted
Updated 17-Aug-11 22:33pm
v2
Comments
Prerak Patel 18-Aug-11 4:23am    
Elaborate more or share some relevant code.

1 solution

Try using dropdownlist and Textbox inside two separates updatepanels(ie ajaxupdatepanel)

and on your current panel make a button with ID= ButtonOk

This may help you
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900