Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 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 Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 6th, 2007, 11:57 AM
Registered User
 
Join Date: May 2007
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default problem with session variable

hi all,
       I am facing a problem that when i am opening a new webpage on the existing webpage then the value of session variable is not accessable in new opening page.it shows null.if i simple redirect the form by Response.Redirect then value is not loose.please help me

  #2 (permalink)  
Old May 8th, 2007, 01:51 AM
Friend of Wrox
 
Join Date: May 2006
Location: Delhi, Delhi, India.
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Whenever a browser application started a new sesssion is created.But a session is maintained if u navigate from one page to other. So make sure u'r code is just opening new pages.

Bijgupt
  #3 (permalink)  
Old May 10th, 2007, 11:04 AM
Authorized User
 
Join Date: Dec 2004
Location: Swindon, Wilts, United Kingdom.
Posts: 68
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to DZukiewicz
Default

Response.Redirect points away from your site and back into it. The server will think its a new user and will give you a new session.

Try using Server.Transfer if you are doing it internally.
  #4 (permalink)  
Old May 10th, 2007, 11:41 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Quote:
quote:Originally posted by DZukiewicz
 Response.Redirect points away from your site and back into it. The server will think its a new user and will give you a new session.

That is not true. Assuming that you have session maintenance configured, any new request to the browser, whether it comes from a user click action on an <a> tag or from a Response.Redirect, will carry with it session identification in the form of the session ID in the cookie that is sent with each request.

-Peter
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Session Variable Problem caterpillar General .NET 0 August 17th, 2006 11:26 AM
Another Session Variable Problem jim.sullivan@telus.net Classic ASP Databases 1 August 1st, 2004 03:58 AM
Session Variable Problem leo_vinay Classic ASP Professional 1 October 1st, 2003 10:51 PM



All times are GMT -4. The time now is 10:43 PM.


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