0

I'm trying to use the AjaxToolkit's ModalPopupExtender, but it doesn't work. In fact, as soon as it opens, it's getting closed. So I can see that it is rendered, but it's getting closed in the second.

I tried that with IE6 and Firefox 3, it does the samething.

Here's the code:

<AjaxControlToolkit:ModalPopupExtender ID="ModalPopupExtender1" TargetControlID="ButtonTarget" PopupControlID="Panel1" OkControlID="ButtonOk" CancelControlID="ButtonCancel" BackgroundCssClass="modal-background" runat="server">
</AjaxControlToolkit:ModalPopupExtender>

<asp:Panel ID="Panel1" Style="display: none;" runat="server">
<%-- some stuff... --%>
</asp:Panel>
Allov
  • 1,308
  • 1
  • 13
  • 23
  • 1
    Can you post a bit more of a code sample? It sounds like a partial postback is completing and resetting the page to its original layout (ie: with the popup hidden) but it's hard to tell from your example. – Town Aug 19 '09 at 14:39

1 Answers1

1

Use update panel for that work because when you click button it take also post back so thats why you just see the popup and it close on same time.

Emaad Ali
  • 1,483
  • 5
  • 19
  • 42
  • Even if I'm not working on this project anymore, and it's been about 8 months (and I probably found a work around since then), I think that this would be a correct assessment that I was missing an update panel. Thanks – Allov Mar 29 '10 at 13:01
  • Mentioned not, yup you right that you missing this thing because few months ago i am also facing this type of problem which would be solved by my ownself. can you please vote my answer.as you find my solution correct? – Emaad Ali Mar 30 '10 at 10:31