ASP Session Variable Info missing after accessing ASPX

  • Thread starter Thread starter Arthur
  • Start date Start date
A

Arthur

I have a mix web site, ASP and ASPX files.
I have assigned a value to Session("Date") and the href to
an ASPX page. When I further href to another ASP Page. The
content in Session("Date") becoming blank. Is it in
design? Or bug? Is there any work around solution?

Also, Is there any way to secure my ASPX source code from
client? I don't want clients to be able to see the source
code but they can run the ASPX.

Thanks
 
Are you initially setting Session("Date") in ASP or ASPX? Session variables
don't automatically pass from ASP and ASPX pages in the same application.
(If this is what you're trying to do - take a look at
http://www.sessionbridge.com. It's a utility to help with this.)

If you're setting it in an ASP page, navigating to an ASPX page, and then
going to another ASP page - the session variable set on the first page
should still be available as long as your timeout hasn't expired. By having
ASP and ASPX in the same application, the client has 1 session with ASP and
another session with ASPX. This shouldn't be any different than navigating
to a page on another site and then back to yours (again, as long as the
timeout hasn't expired).

As far as securing the ASPX, if you use "code-behind" pages - that code is
compiled into the DLL and only your HTML is in the ASPX file.

Jeff Trotman
Westglenn Software
 
Back
Top