Once we tried using modal dialog window for editing records. Following javascript is used to open the edit page.
window.showModalDialog( editPageUrl, “Update records”, “dialogWidth:350px;dialogHeight:300px”);
This edit page was fetching records from database in its page_load event. We faced following issues.
I> When clicked on the submit button, the parent page opens in a new window:
To resolve this just add <base target=”_self”> in head part of modal window.
II> After editing record using this modal window, if we try to open the edited record it displays the old values. This seems to because of caching. So just turn of the caching for the modal window page. To do this add following lines before <html> tag of the aspx page. <%@ OutputCache Location=”None” VaryByParam=”None” %>
