I have two ASP.NET Web Pages (Page1.aspx and Page2.aspx), Page1.aspx contains few TextBox controls and a Button Control.
On Click Event of Button Control i redirect user to Page2.aspx using Response.Redirect method.
How do i access source page data (TextBox values in Page1.aspx) from target page (Page2.aspx).
I don’t want to use Cross-Page Postback or Server.Transfer method
Thank You.
You’ll need to persist that data somewhere. The way
Response.Redirectworks is by telling the client (the web browser) to make a new request for the specified resource. This essentially means that the old resource is abandoned. Think of each request made by the client as unique and stand-alone.An easy way to persist the values is to store them in Session state on
Page1just before callingResponse.Redirect. Then, inPage2you can retrieve those values from Session state.Something like:
Page1
Page2