Pass SessionID from 1 fn to other

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How should I pass the SessionID(when I logon, I get the SessionID) from 1
function to another in VB.Net.

I declared g_SessionID globally, then in another function, I take SessionID
as input and use it like this:
queryAssetListXml = "<?xml version='1.0' ?>" & _
"<QueryAssetList2
xmlns=""urn:schemas-tms:QueryAssetList2"">" & _
"<SessionID>" & g_SessionID & "</SessionID>" & _
"</QueryAssetList2>"


But, I notice that even I get the SessionID , SessionID still remains
Null.Any idea?
 
It seems...

a) you are programming under ASP.NET
b) both functions are called in separate pages

Here are a few hints:

* HTTP is a stateless protocoll, means everything not stored in Session[] or
Application[] gets lost after each page request.

* The Session object is available from *any* page in your web application
and even from within classes outside using the static
HttpContetxt.Current.Session object. So there is no need to store it
anywhere.

* Using global variables is bad programming style.

HTH,
www.sportboatcharter.com
Axel Dahmen
 
I am using VB.Net

Axel Dahmen said:
It seems...

a) you are programming under ASP.NET
b) both functions are called in separate pages

Here are a few hints:

* HTTP is a stateless protocoll, means everything not stored in Session[] or
Application[] gets lost after each page request.

* The Session object is available from *any* page in your web application
and even from within classes outside using the static
HttpContetxt.Current.Session object. So there is no need to store it
anywhere.

* Using global variables is bad programming style.

HTH,
www.sportboatcharter.com
Axel Dahmen


--------------------------
"XML newbie: Urgent pls help!"
How should I pass the SessionID(when I logon, I get the SessionID) from 1
function to another in VB.Net.

I declared g_SessionID globally, then in another function, I take SessionID
as input and use it like this:
queryAssetListXml = "<?xml version='1.0' ?>" & _
"<QueryAssetList2
xmlns=""urn:schemas-tms:QueryAssetList2"">" & _
"<SessionID>" & g_SessionID & "</SessionID>" & _
"</QueryAssetList2>"


But, I notice that even I get the SessionID , SessionID still remains
Null.Any idea?
 
I am using VB.Net

ASP.NET is a framework, not a language. You are utilizing ASP.NET when
programming using VB.NET, C#.NET, J#.NET or any other language supporting
the .NET framework.

HTH,
Axel Dahmen
 
Back
Top