Passing Info from one page to another

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi People,

Just wondering how we can pass info from one page to another when we enter
Response.Redirect("CertainPage.aspx",false), so that we can observe this
information and display corresponsing info on the screen of the new page.

Will wait for useful responses.

Thanks,

Irfan
 
There are a number of ways to pass values from one page to
another, such as using the querystring, cookies, session,
context, saving to a temporary table in the database between each page, etc.
You'll have to decide which technique is best for your application.

Here are several good articles on the subject to help you decide.
http://www.dotnetbips.com/displayarticle.aspx?id=79

http://msdn.microsoft.com/msdnmag/issues/03/04/ASPNETUserState/default.aspx

http://www.aspalliance.com/kenc/passval.aspx

Here's a nice, simple way to pass values from one page to another:
(VB.NET code)

'Add data to the context object before transferring
Context.Items("myParameter") = x
Server.Transfer("WebForm2.aspx")

Then, in WebForm2.aspx:

'Grab data from the context property
Dim x as Integer = CType(Context.Items("myParameter"),Integer)
 
Back
Top