473,763 Members | 5,396 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Losing session variable across response.redire ct in same folder

Hi, I have a routine that sets some session variables and then redirects the
user to another page in the same application/ same folder.

=======
Session("MyName ") = "Fredsmith"
Response.Redire ct("./AnewPage.aspx")
=======

If I go, Response.Write( Session("MyName ")) in the new page the session
variable does not exist.

I have all cookies enabled (session works for other pages) and understand
redirecting across different domains clears session variables etc but this
is a weird one!

I have debugged right up until the Response.Redire ct call and the session
variable exists, it's the Redirect that is killing the session variable.

Help appreciated
Cheers
Mark


Nov 18 '05 #1
1 3237
did you chack, that the application is not restarting at this point, for
some reason?
in AnewPage.aspx, do you still get session vars stored by other pages?

"John" <JD@noSpam.co m> wrote in message news:c5******** **@lust.ihug.co .nz...
Hi, I have a routine that sets some session variables and then redirects the user to another page in the same application/ same folder.

=======
Session("MyName ") = "Fredsmith"
Response.Redire ct("./AnewPage.aspx")
=======

If I go, Response.Write( Session("MyName ")) in the new page the session
variable does not exist.

I have all cookies enabled (session works for other pages) and understand
redirecting across different domains clears session variables etc but this
is a weird one!

I have debugged right up until the Response.Redire ct call and the session
variable exists, it's the Redirect that is killing the session variable.

Help appreciated
Cheers
Mark

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1904
by: farooqazeem | last post by:
Hi guys, I’m facing some problem can u solve it. Problem is: I’m giving user Id and password in (Login_sess.asp) and submit it to page (sess_test.asp). I am setting session variable (session(“Sin”)=”Yes”) just before redirecting to the same page, but in first time I do not received the value of session variable when I redirect it, when I execute this process second time or redirect it only with the page name...
1
357
by: John | last post by:
Hi, I have a routine that sets some session variables and then redirects the user to another page in the same application/ same folder. ======= Session("MyName") = "Fredsmith" Response.Redirect("./AnewPage.aspx") ======= If I go, Response.Write(Session("MyName")) in the new page the session variable does not exist.
6
1524
by: Mike | last post by:
I have a function that is called when the user clicks the submit button, during this function i also set a varaible to "Y" due to that this function does a post back to the page then redirects. When I look for the session variable in the page.isPostBack section it equals nothing, it appears that the variable is not being passed to the post back section correctly. I have this due to I only want this function to run if the user has something...
2
291
by: Frank Bishop | last post by:
Can someone tell me why I'm losing my session variable when using Response.Redirect? When I use the RedirectFromLoginPage method(currently remmed out below), my session variable works fine, but I'm trying this other way with Response.Redirect and it seems all my redirection works, but it loses the session variable when I hit the redirected pages. Help appreciated. Here is code: <code> <%@ Import Namespace="System.Data.OleDB" %> <%@...
7
2244
by: Lucas Tam | last post by:
I'm calling the session object from an inherited page. The page is based off an herited class which outputs XML. Does anyone know why the session object would be nothing? httpcontext.current.request/response/etc all work, except for session. Thanks. --
9
2546
by: Adrian Parker | last post by:
We have a website that works everywhere but on a few PCs on this one site.. Asp.Net 1.1 Server = Windows 2003 Client = XP In the web.config we use - cookieless="false" in the browser settings they have "Always allow session cookies" set to true When the browser connects to the website the first page sets a session variable called "user_ref" to something and then calls another page. If on
0
982
by: Frank Bishop | last post by:
Can someone tell me why I'm losing my session variable when using Response.Redirect? When I use the RedirectFromLoginPage method(currently remmed out below), my session variable works fine, but I'm trying this other way with Response.Redirect and it seems all my redirection works, but it loses the session variable when I hit the redirected pages. Help appreciated. Thanks. Here is code: <code> <%@ Import Namespace="System.Data.OleDB" %>
0
1396
by: Jimmy Reds | last post by:
Hi, Sorry if this appears twice but I post through Google Groups and it had a funny 5 minutes and didn't appear to post this message the first time. I am setting session variables on a page then doing a header/location redirect to a second page however I am losing one of my session variables. Not all of them, just one.
4
2053
by: =?Utf-8?B?SlA=?= | last post by:
All the sudden my app has started to loose Session values after a Response.Redirect to another page in the same project. Ive read several post about setting the Terminate Boolean to false to solve this problem, but it hasnt work. On top of that it seems total random. I have a start.aspx page that all other web application call to begin the process. This start page creates needed Sessions and other miscellaneous tasks, and then redirects...
0
9564
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
10148
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9938
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9823
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8822
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7368
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6643
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3917
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3528
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.