Not sure if this is exactly what you want, but you could use cross-publishing for this. This allows you to return to the parent page from the child page with the advantage of accessing the ViewState child page. To do this, you set the PostBackUrl property of the button on the child page. On the parent page, you can access the PreviousPage property to retrieve values ββfrom the child page. Thus, there is a button on the child page, for example:
<asp:Button ID="Button1" runat="server" Text="Update data" PostBackUrl="~/Parent.aspx" onclick="Button1_Click" />
Then in the Parent.aspx Page_Load event:
protected void Page_Load(object sender, EventArgs e) { if (IsCrossPagePostBack) { Page prevPage = this.PreviousPage; string myVal = prevPage.FindControl("myTextBox1").ToString(); string myVal2 = prevPage.FindControl("myTextBox2").ToString();
Ciaran bruen
source share