jquery ui dialog opens only once

Viewed 16803

I have a button that opens a dialog when clicked. The dialog displays a div that was hidden

After I close the dialog by clicking the X icon, the dialog can't be opened again.

3 Answers

As an addition to the accepted answer i would like to add that you need to pay attention when using this in an asp.net updatepanel. If you click the button then a postback will happen, the popup will open but won't open a second time because of the postback that happened. So you should make sure that the button you use to open the popup does not postback. ie:

<asp:LinkButton ID="btn1" runat="server" OnClientClick="return false;">Click me</asp:LinkButton>
Related