[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.mobile

Does RedirectToMobilePage create a new http session?

peter

5/31/2002 11:33:00 AM

Hi,
It seems that when I direct to a new mobile page use
RedirectToMobilePage(url), it always creates a new http
session so I lost all the session data in the original
session. Is it the case? anyone can confirm this?
1 Answer

Tom Nicholas

6/10/2002 10:01:00 PM

0

In our development we have not seen this, however this is
how we usually code it:

1. After our user successfully logs in we create the
session variables we need: Session.Add("varname", "initial
value")

2. We use redirecttomobilepage(url) a lot; especially
after a mobile form has posted via a command button and we
are satisfied with the results.

3. On subsequent pages we use the values (example):
gThisUsersShirtSize = myDB.GetUserShirtSize(Session.Item
("dblShirtSize"))

4. We validated that we are not losing the session
variable information (ancient debugging technique) by
dumping out some session variable values on the page to
which we have just redirected ourselves. For example, on
the page_load event of the new page we set the .text
property of a label to be the value of the session
variable.. that way we know we didn't lose it.

5. For sanity purposes, we have a section of our
web.config file commented out that includes a list of
every session variable we are using and it's purpose.

Good luck,

Tom
http://www.tom...


>-----Original Message-----
>Hi,
>It seems that when I direct to a new mobile page use
>RedirectToMobilePage(url), it always creates a new http
>session so I lost all the session data in the original
>session. Is it the case? anyone can confirm this?
>.
>