Thursday, August 21, 2008

Get Previous Page Form Values

To get the previous page form element values follow the steps below

Parent page do a Server.Transfer instead of Response.Redirect

Server.Transfer("ChildPage.aspx", true);

true for preserving the form element values

In the ChildPage.aspx access the values from ParentPage.aspx like thus

((TextBox)(PreviousPage.FindControl("TextBox1"))).Text;

No comments: