Wrox Programmer Forums
|
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 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 May 6th, 2007, 11:57 AM
Registered User
 
Join Date: May 2007
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

 
Old May 8th, 2007, 01:51 AM
Friend of Wrox
 
Join Date: May 2006
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
 
Old May 10th, 2007, 11:04 AM
Authorized User
 
Join Date: Dec 2004
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.
 
Old May 10th, 2007, 11:41 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
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





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 [email protected] 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





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