Showing posts with label retrieve. Show all posts
Showing posts with label retrieve. Show all posts

Saturday, March 31, 2012

session uniqueid

Do sessions automatically create a unique ID constraint like a GUID when they are instantiated on a web page? If so how can i retrieve it in C#?

ThanksEach session has a session ID. Use Session.SessionID to get it. This id is, however, not unique all the time.

Monday, March 26, 2012

Session variable in javascript

How can retrieve a Session value in javascript which I had set in
code-behind ?"sramruttun" <sramruttun@.yahoo.com> wrote in message
news:%23HNeXvZVDHA.2228@.TK2MSFTNGP12.phx.gbl...
> How can retrieve a Session value in javascript which I had set in
> code-behind ?

By putting it into a hidden field from the code-behind?

Luc K
Session variables are mainly used on the Server side. You may use cookies if
you need to read them from the client in Javasript.

"sramruttun" <sramruttun@.yahoo.com> wrote in message
news:%23HNeXvZVDHA.2228@.TK2MSFTNGP12.phx.gbl...
> How can retrieve a Session value in javascript which I had set in
> code-behind ?
http://www.dotnet247.com/247reference/msgs/5/26815.aspx
http://www.w3schools.com/aspnet/con...inputhidden.asp

Luc K

"sramruttun" <sramruttun@.yahoo.com> wrote in message
news:uJUt%236mVDHA.2268@.TK2MSFTNGP11.phx.gbl...
> thanks luc for the consideration
> can u give me a small piece of code?
>
> "Luc Kumps" <NOkumpsSPAM@.pandora.be> wrote in message
> news:hGoVa.38995$F92.4038@.afrodite.telenet-ops.be...
> > "sramruttun" <sramruttun@.yahoo.com> wrote in message
> > news:%23HNeXvZVDHA.2228@.TK2MSFTNGP12.phx.gbl...
> > > How can retrieve a Session value in javascript which I had set in
> > > code-behind ?
> > By putting it into a hidden field from the code-behind?
> > Luc K
thanks Luc - the links have been helpful

"Luc Kumps" <NOkumpsSPAM@.pandora.be> wrote in message
news:T6MVa.41177$F92.4366@.afrodite.telenet-ops.be...
> http://www.dotnet247.com/247reference/msgs/5/26815.aspx
> http://www.w3schools.com/aspnet/con...inputhidden.asp
> Luc K
> "sramruttun" <sramruttun@.yahoo.com> wrote in message
> news:uJUt%236mVDHA.2268@.TK2MSFTNGP11.phx.gbl...
> > thanks luc for the consideration
> > can u give me a small piece of code?
> > "Luc Kumps" <NOkumpsSPAM@.pandora.be> wrote in message
> > news:hGoVa.38995$F92.4038@.afrodite.telenet-ops.be...
> > > > "sramruttun" <sramruttun@.yahoo.com> wrote in message
> > > news:%23HNeXvZVDHA.2228@.TK2MSFTNGP12.phx.gbl...
> > > > How can retrieve a Session value in javascript which I had set in
> > > > code-behind ?
> > > > By putting it into a hidden field from the code-behind?
> > > > Luc K

Thursday, March 22, 2012

Session Variables

Is it possible to retrieve a session variable using a ASP.net page when the variable has be set using an ASP page?
SCIt can be done. Check this article out:

http://www.asp101.com/articles/sidney/sharingsessionstate/default.asp