RE: Accessing Session information from Javascript
From: Leon Welicki (LeonWelicki_at_discussions.microsoft.com)
Date: 10/08/04
- Next message: Scott Allen: "Re: can Webclient class be used with Asp.net Session?"
- Previous message: Jazz: "DLL not register"
- In reply to: Jeronimo Bertran: "RE: Accessing Session information from Javascript"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 8 Oct 2004 13:03:03 -0700
Another option could be to have a hidden iframe and navigate to a page (via
javascript) that returns the session variable value (for instance, something
getSessionValue.aspx?var=varName).
The getSessionValue.aspx only needs to do the something like
Response.Write(Session(Request.QueryString["var"]))
Then, you can access via Javascript to inner value of that div
This option gives you session information at the moment, but you have to
deal with syncronization issues and javascript client programing.
Regards,
Leon
"Jeronimo Bertran" wrote:
> ok, now... my problem is that the value that needs to be saved is generated
> inside a page that lies inside a frame of the form that needs to know the
> value.... how can I save the value to a hidden input field in the main
> form? Or access the hidden input field in the child frame from my main
> form?
>
>
> "=?Utf-8?B?U2F1cmFiaCBOYW5kdQ==?="
> <SaurabhNandu@discussions.microsoft.com> wrote in
> news:82524D53-58A8-43FF-A20A-0B1E5D306220@microsoft.com:
>
> > Hi,
> >
> > Client-Side scripts cannot access Server-Side variables! Hence you
> > cannot access the server-side session object from your javascript.
> >
> > I'd suggest that instead of savig that value to a session save it to a
> > hidden input field, so that the JavaScript can read the value from it.
> >
>
>
- Next message: Scott Allen: "Re: can Webclient class be used with Asp.net Session?"
- Previous message: Jazz: "DLL not register"
- In reply to: Jeronimo Bertran: "RE: Accessing Session information from Javascript"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|