Managing state using querystrings

  • Thread starter Thread starter Swati
  • Start date Start date
S

Swati

Hello All,

I am developing a web application using ASP.NET I need access to some
data on all pages like user id etc. I cannot use Session as I have lot
of new window popups and the session data does not get shared across
them. I cannot use hidden variables to pass data across pages, as the
pages that open in new window do so by a http get method and this data
is not available.
So, I have to use querystring variables only but it is not secure.
Does anybody know how I can use the querystring variables in code but
hide them from users. I have my own page class deriving from
System.Web.UI.Page where some common processing is done. All my pages
derive from this class. Can I make use of this page class. I was
trying to see if Context.RewritePath is of any help .. but I am not
sure how I can use it.
Can anyone suggest a solution for the same please. I have been hitting
my head hard on this...

-
Swati
 
Anything on the client (QueryString, HTML, CSS, JavaScript) is going to be
viewable by the user.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
I think sessions are shared across all windows used by a user - regardless
of whether they pop-up or not.
 
I think sessions are shared across all windows used by a user - regardless
of whether they pop-up or not.

Browser-dependent.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
Can anyone suggest a solution for the same please. I have been hitting
my head hard on this...

How about creating a GUID for the user and storing it in a cookie.
Store your user-specific data in a database, keyed on the GUID. When
the request comes in, get the GUID out of the cookie and look up the
information in the database. You'd essentially be maintaining your own
session variables but outside of the ASP.NET Session object.
 
Back
Top