Postback in ASP.NET

This post is a short explanation of the postback "magic" used in asp.net. Check this out.
If you have to change data in a popup and also this information have to be changed in the parent page you can use window.openere.document.__doPostBack('',''); to do postback on the parent page and refresh the information there. The event target id can be passed by session variable or page parameter to the popup. The actual actions in the popup are these:

window.close();
var theform = window.opener.document.aspnetForm;
theform.__EVENTTARGET.value = id
theform.__EVENTARGUMENT.value = '';
theform.submit();

No comments:

Post a Comment