473,411 Members | 2,154 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,411 software developers and data experts.

Problems with session and application variables

In my code I assign a value to a session variable such as
Session("CustID")=Customer. The value persists until I hit a command button.
When this occurs the code before the 'If Not IsPostBack Then' executes
(which doesn't explicitly affect the value) but I inmediately lose the
session and application variables. The same occurs if I execute the following
: Response.Redirect(biz_errors.aspx?ID=" & CustID). I'm currently using IE
6.0.2...Windows XP. Is there a setting for IE I need to turn on or off to get
this to work? My web.config session settings looks like this:

SessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;user id=sa;password="
cookieless="false" timeout="20". Any help will really be appreciated!

TIA
Jan 25 '06 #1
2 1057
You need to post the code in the Page_Load event Steven

--
Best Regards

The Inimitable Mr Newbie º¿º


"Steven" <St****@discussions.microsoft.com> wrote in message
news:10**********************************@microsof t.com...
In my code I assign a value to a session variable such as
Session("CustID")=Customer. The value persists until I hit a command
button.
When this occurs the code before the 'If Not IsPostBack Then' executes
(which doesn't explicitly affect the value) but I inmediately lose the
session and application variables. The same occurs if I execute the
following
: Response.Redirect(biz_errors.aspx?ID=" & CustID). I'm currently using IE
6.0.2...Windows XP. Is there a setting for IE I need to turn on or off to
get
this to work? My web.config session settings looks like this:

SessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;user id=sa;password="
cookieless="false" timeout="20". Any help will really be appreciated!

TIA

Jan 25 '06 #2
Thanks for your response.....but the code is in the Page_Load event....

Any other possible solution?

"Mr Newbie" wrote:
You need to post the code in the Page_Load event Steven

--
Best Regards

The Inimitable Mr Newbie º¿º


"Steven" <St****@discussions.microsoft.com> wrote in message
news:10**********************************@microsof t.com...
In my code I assign a value to a session variable such as
Session("CustID")=Customer. The value persists until I hit a command
button.
When this occurs the code before the 'If Not IsPostBack Then' executes
(which doesn't explicitly affect the value) but I inmediately lose the
session and application variables. The same occurs if I execute the
following
: Response.Redirect(biz_errors.aspx?ID=" & CustID). I'm currently using IE
6.0.2...Windows XP. Is there a setting for IE I need to turn on or off to
get
this to work? My web.config session settings looks like this:

SessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;user id=sa;password="
cookieless="false" timeout="20". Any help will really be appreciated!

TIA


Jan 26 '06 #3

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

Similar topics

2
by: Jose Meireles | last post by:
Hi everyone, I'm trying to use public variables in a web form to hld specific values. What happens is that the public variables (declared as public x as y in the beginning of the class), doesn't...
9
by: William LaMartin | last post by:
I have a problem, mentioned here before, of Session and Application variables disappearing at one site but not at others or on my development computer. The problem is illustrated by an example...
2
by: John Mullin | last post by:
We are having a problem which appears similar to a previous posting: http://groups.google.com/groups?hl=en&lr=&frame=right&th=d97f552e10f8c94c&seekm=OZw33z9EDHA.2312%40TK2MSFTNGP10.phx.gbl#link1 ...
9
by: jsale | last post by:
Hello, I am having a problem with multiple users using my asp.net application - namely that if each user clicks save at the same time, some, or all, of the users crash out. Do I need to do...
10
by: tshad | last post by:
I have been using the default session state (InProc) and have found that I have been loosing my information after a period of time (normally 20 minutes). Is there anyway to find out how much...
3
by: Alan Wang | last post by:
Hi there, Once my application gets complicated and complicated. I found it's really hard to keep track of Session value I am using in my asp.net application. I am just wondering if anyone have...
5
by: Sean | last post by:
Problem with sessions I have created an application without concern for sessions. As it turns out I think that might be my undoing. What I have: I have an online quiz. I don’t need to know...
1
by: Larry Neylon | last post by:
Hi, I'm working on a VBScript application on IIS6 and I'm looking for some advice about the best way of replacing or improving session variable usage. The application is in a secure extranet...
18
by: BillE | last post by:
When a user opens a new IE browser window using File-New-Window the integrity of an application which relies on session state is COMPLETELY undermined. Anyone who overlooks the fact that...
26
by: BillE | last post by:
Some ASP.NET applications use Session Variables extensively to maintain state. These should be re-written to use viewstate, hidden fields, querystring, etc. instead. This is because if a user...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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 project—planning, coding, testing,...
0
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...
0
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...

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.