Home All Groups Group Topic Archive Search About

Pass SessionID from 1 fn to other

Author
21 Feb 2006 6:47 PM
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?

Author
22 Feb 2006 8:49 PM
Axel Dahmen
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!"
<XMLnewbieUrgentplsh***@discussions.microsoft.com> schrieb im Newsbeitrag
Show quote
news:FCC995DB-4282-42A3-B167-78B74B28FC55@microsoft.com...
> 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?
>
Author
23 Feb 2006 6:18 PM
XML newbie: Urgent pls help!
I am using VB.Net

Show quote
"Axel Dahmen" wrote:

> 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!"
> <XMLnewbieUrgentplsh***@discussions.microsoft.com> schrieb im Newsbeitrag
> news:FCC995DB-4282-42A3-B167-78B74B28FC55@microsoft.com...
> > 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?
> >
>
>
>
>
>
Author
4 Mar 2006 12:36 AM
Axel Dahmen
> 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

AddThis Social Bookmark Button