Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 6th, 2007, 04:22 AM
Registered User
 
Join Date: Jan 2007
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to AzlanAziz
Default Need opinion on carrying session across page

i created a simple application pages which span arnd 3 pages which required an Id to log in. I set it ID in a session.

if i were to send it to 2nd page it something like this: (Page2.aspx)
  Session("id") = TextBox1.Text
  Server.Transfer("2nd.aspx")

In the 2nd page…( i need to do some processing here and send the to the 3rd page)

  Label1.Text = Session("id").ToString()
  Server.Transfer("3rd.aspx")

Is there a better/right/elegent way to execute this

 
Old November 6th, 2007, 09:28 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Why are you using Server.Transfer? Without knowning what you are trying to accomplish its hard to say if this is the best/right/or most elegnat way to do this.



================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
.: Wrox Technical Editor :.
Wrox Books 24 x 7
================================================== =========
 
Old November 6th, 2007, 09:34 AM
Registered User
 
Join Date: Jan 2007
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to AzlanAziz
Default

well basically the user will use his socialID to get in the page, this ID will be stored in a session and will be processes in the second and the third page ... the 2nd page is an input form while third one is to print the applicants report based on his input in the second page

 
Old November 6th, 2007, 09:39 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

I suppose that will work. A more effecient way might be to use the Login Control:
http://msdn2.microsoft.com/en-us/library/ms178329.aspx

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
.: Wrox Technical Editor :.
Wrox Books 24 x 7
================================================== =========





Similar Threads
Thread Thread Starter Forum Replies Last Post
Opinion - How would you of done this differently? dparsons Intro Programming 0 May 15th, 2007 02:00 PM
Your Opinion Needed Aaron Edwards ASP.NET 2.0 Basics 0 December 3rd, 2006 01:33 PM
An opinion on my join please mat41 Classic ASP Professional 2 March 29th, 2004 02:49 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.