The solution is to use __doPostBack, pretty simple
I didn't have time to share the solution....
here goes
Page 1
has gridview in an updatepanel
page 2
has some action, after which it should update the gridview on page 1
Page1 has some javascript like
function refresh()
{
var btnid = '<%=btnUpdate.UniqueID%>'
__doPostBack(btnid, "OnClick");
}
the the update panel with a gridview and a button
<asp:updatepanel id="UpdatePanel1" runat="server" onload="UpdatePanel1_Load" xmlns:asp="#unknown">
<contenttemplate>
<asp:gridview....>
</asp:gridview....></contenttemplate>
<triggers>
<asp:asyncpostbacktrigger controlid="btnUpdate" eventname="Click" />
</triggers>
</asp:updatepanel>
<asp:button id="btnUpdate" runat="server" style="display:none;" xmlns:asp="#unknown" />
and on page 2
<script language="Javascript">
function RefreshParent() {
parent.refresh();
}
</script>
call this JavaScript function like:
ClientScript.RegisterClientScriptBlock(this.GetType(), "afterSave", "refresh();", true);
Hope this helps