passing information from one aspx page to another

  • Thread starter Thread starter Gaye Kruchten
  • Start date Start date
G

Gaye Kruchten

Hi!

I'm just getting starting in web development using ASP.NET and have a very
basic question. I have a web page that captures name and address
information. I want to pass this information on to another page where the
user would confirm the information or return back to the original page to
make corrections if they had made a mistake. What would be the recommended
way to handle this situation using asp.net?

I have also read some information on using web controls and performance. At
what point does using web controls become detrimental to performance?

I appreciate the guidance.

Gaye
 
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)

Of course 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://msdn.microsoft.com/msdnmag/issues/03/04/ASPNETUserState/default.aspx

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

http://www.dotnetjunkies.com/tutorials.aspx?tutorialid=600

http://www.dotnetbips.com/displayarticle.aspx?id=79
 
Back
Top