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?
Axel Dahmen - 22 Feb 2006 20:49 GMT
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
--------------------------
> How should I pass the SessionID(when I logon, I get the SessionID) from 1
> function to another in VB.Net.
[quoted text clipped - 9 lines]
> But, I notice that even I get the SessionID , SessionID still remains
> Null.Any idea?
XML newbie: Urgent pls help! - 23 Feb 2006 18:18 GMT
I am using VB.Net
> It seems...
>
[quoted text clipped - 33 lines]
> > But, I notice that even I get the SessionID , SessionID still remains
> > Null.Any idea?
Axel Dahmen - 04 Mar 2006 00:36 GMT
> 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