Friday, December 16, 2011

Update an container or update panel from a modal popup

If you need to update an update panel from an outside child container you could do like this

1) Create an link with an associated method


asp:LinkButton ID="btnRefreshFolderContent" CssClass="ButtonOff"
asp:TextBox ID="test" runat="server" 

2) Create the javascript (included in the pop-up)



function UpdateFolder() {
window.dialogArguments.__doPostBack('Folder$btnRefreshFolderContent', '');
}


3) Trigger on some button

ScriptManager.RegisterStartupScript(this, this.GetType(), "refresh", "UpdateFolder();window.close();", true);

No comments:

Post a Comment