.NET walkabout
posts - 11, comments - 18, trackbacks - 0


ShowModalDialog and ASP.NET, a full working example

Here is a simple working example explaining how to use ShowModalDialog and with Visual Studio 2005. Start with default.aspx, which has a single button. Once clicked, it will popup a modal window which will show a single button labeled "Close me!". The postback will redirect the user to a new page, whose purpose is to close the modal window and return the string value '1' which will be evalueted by the parent window using the returnValue property. If returnValue is '1' then the form will be submitted to itself, just to show how to reuse local values and force a timer label...

posted @ Sunday, September 2, 2007 9:54 PM | Feedback (4) | Filed Under [ ASP.NET ShowModalDialog ]

ShowModalDialog and ASP.NET postback

Whenever you use a postback in a modal window, magically Internet Explorer fires the event in a new page. To avoid Internet Explorer to act like that, just add... <base target="_self" /> ... wherever you want, just before the HTML Tag or simply in between the HEAD tag of your HTML page.

posted @ Wednesday, August 22, 2007 5:28 PM | Feedback (1) | Filed Under [ ASP.NET ShowModalDialog ]

Powered by:
Powered By Subtext Powered By ASP.NET