[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

Can we restore View State after Session Expires?

rajmgopal

6/15/2006 11:38:00 PM

Hi
As you are all aware, in mobile pages the View State is stored in the
Session and when the Session expires the View State also expires.

What I would like to know is whether there is a way to restore the View
State in some way when this happens.

For now I am handling the exception in OnViewStateExpire(...) and
transfering clients to an error page.

This problem is most prevalent during postbacks. We have access to
postback data , but not View State data ...

Any suggestions/comments will be greatly appreciated

Thank you in advance
Regards
Raj

2 Answers

Christoph Richter [AT]

6/18/2006 4:42:00 PM

0

You can turn off storing in the session and relly try to limit the
data in the viewstate (since you should limit the data in mobile
pages)
or make your own PageStatePersister that stores the viewstate and the
control state wherever you want. maybe an sql server (e.g. what could
be the best is, store the controlstate in the client and the viewstate
in the session.)

cheers,
christoph



On 15 Jun 2006 16:37:59 -0700, "rajmgopal" <rajmadangopal@gmail.com>
wrote:

>Hi
>As you are all aware, in mobile pages the View State is stored in the
>Session and when the Session expires the View State also expires.
>
>What I would like to know is whether there is a way to restore the View
>State in some way when this happens.
>
>For now I am handling the exception in OnViewStateExpire(...) and
>transfering clients to an error page.
>
>This problem is most prevalent during postbacks. We have access to
>postback data , but not View State data ...
>
>Any suggestions/comments will be greatly appreciated
>
>Thank you in advance
>Regards
>Raj

Cheers,
Christoph

Vienna/Austria

www.code4ward.net/blogs/cmn

rajmgopal

6/19/2006 5:25:00 PM

0

Hi Christoph
Thanks for the suggestion.

Regards
Raj

Christoph Richter [AT] wrote:
> You can turn off storing in the session and relly try to limit the
> data in the viewstate (since you should limit the data in mobile
> pages)
> or make your own PageStatePersister that stores the viewstate and the
> control state wherever you want. maybe an sql server (e.g. what could
> be the best is, store the controlstate in the client and the viewstate
> in the session.)
>
> cheers,
> christoph
>
>
>
> On 15 Jun 2006 16:37:59 -0700, "rajmgopal" <rajmadangopal@gmail.com>
> wrote:
>
> >Hi
> >As you are all aware, in mobile pages the View State is stored in the
> >Session and when the Session expires the View State also expires.
> >
> >What I would like to know is whether there is a way to restore the View
> >State in some way when this happens.
> >
> >For now I am handling the exception in OnViewStateExpire(...) and
> >transfering clients to an error page.
> >
> >This problem is most prevalent during postbacks. We have access to
> >postback data , but not View State data ...
> >
> >Any suggestions/comments will be greatly appreciated
> >
> >Thank you in advance
> >Regards
> >Raj
>
> Cheers,
> Christoph
>
> Vienna/Austria
>
> www.code4ward.net/blogs/cmn