Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Variables losing values

Status
Not open for further replies.

Juice05

Programmer
Dec 4, 2001
247
US
I have an asp.net application that tracks our clients. I have an add client and edit client page that both use a client user control. I am seeing some odd behavior with the edit client form. If I search for a client (Different form) and select one, it takes me to the edit client form. Now if I edit some information and save within the first 60 seconds the application saves the data. If I wait for 60 + seconds the ClientId that was being stored in a variable is lost and the application tries to add a new client. I have other forms that work similar to this (Edit Employee) and they work fine. Has anyone ever run into something like this before?

I can post the code if you need it.

Thanks in advance.
 
ive seen when variable stored in session state, however if other apps are working, dunno. Thats usually a web server setting you can adjust.

where are you storing it?
global declaration?
Dim myVar As Integer
ViewState?
ViewState("myVar") = myVar
SessionState?
Session("myVar") = myVar
Sub specific?
Sub storeVar(sender As Object, e As EventArgs)
Dim myVar As Integer
myVar = 1
gotoThisPage(with myVar)
End Sub
QueryString?
myfile.aspx?myVar=1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top