I have a panel with a ddl on it. DropDownlist makes a postback when i choose options from the ddl. It has onSelectedIndexChange and AutoPostback="true".
Now, I use AjaxPopupExtender. I click on a link. I popup the panel. I choose a value from ddl. It makes a post back. ***Disappears****. I have to click on the link again to pop it up and see the ddl again.
I wrapped my panel in Updatepanel but didnt work. What can I do?
<asp:Panel ID="pnlPaymentOptions" CssClass="modalPanel" runat="server" > .... <asp:DropDownList ID="ddlPaymentType" runat="server" AutoPostBack="true" AppendDataBoundItems="true" OnSelectedIndexChanged="ddlPaymentType_SelectedIndexChanged"> <asp:ListItem Text="-- Select Payment Type" Value="None"></asp:ListItem> <asp:ListItem Text="Check" Value="Check"></asp:ListItem> <asp:ListItem Text="Money Order" Value="Money Order"></asp:ListItem> </asp:DropDownList>--- This is how I pop it:<asp:LinkButton ID="lbAddPayment" runat="server" Text="Add Payment"/> </legend> <ajaxToolkit:ModalPopupExtender BackgroundCssClass="modalBackground" TargetControlID="lbAddPayment" PopupControlID="pnlPaymentOptions" ID="ModalPopupExtender2" runat="server"> </ajaxToolkit:ModalPopupExtender>
I just did this. This keeps the modal-popup on the screen. I can change the ddl value BUT..when I change the ddl value, some sub panels need to show up (visible = true). I step thru the code and it does make a post back...modal popup stays on screen, goes thru correct code but the panels wont show up.
I tried it. Same thing happens in that the panels that must get visible ..dont show up. I set debug. ddl changes value. It DOES make a postback. Modal popup stays on screen which is good . Code goes thru the right section and set the other panels to visible but the screen doesnt show them.
Do I need to wrap other panels in update panel as well??
this is what i have. See the second panel having "visible="false". Code-behind sets it to true. Code goes thru right section but the panel wont show up:
Yes, if you are setting visible=true in the code behind, then you need to wrap the panel in an update panel as well.
<asp:UpdatePanel runat="server"> <ContentTemplate> <asp:Panel ID="Panel1" runat="server"> <asp:UpdatePanel runat="server"> <ContentTemplate> <!-- your drop down list code --> </ContentTemplate> </asp:UpdatePanel> </asp:Panel> </ContentTemplate></asp:UpdatePanel>
Let me try your method.
This is what I tried:
<rad:AjaxSetting AjaxControlID="pnlPaymentO
<UpdatedControls >
<rad:AjaxUpdatedControl ControlID="ddlPaymentType"
</UpdatedControls>
</rad:AjaxSetting>