Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Redirect to self while maintaining view state

Reply
Thread Tools

Redirect to self while maintaining view state

 
 
=?Utf-8?B?amNsYXJrMDczMQ==?=
Guest
Posts: n/a
 
      04-07-2005
I am trying to redirect to the same page after a post-back is fired to ensure
that the post-back never makes it into history (avoids the post-back/refresh
problem). While doing this, I wish to maintain the view state of the page
(page contains dynamic controls as well). Has anybody done this before? I
assume that I need to store the viewstate info in session (as the 64-bit
encoded string or as the statebag? using sql server session statehandler, not
sure if statebag would be acceptable in that case), and then read from that
session-stored view state when the page loads? Any help would be greatly
appreciated.

Thanks
 
Reply With Quote
 
 
 
 
Teemu Keiski
Guest
Posts: n/a
 
      04-07-2005
Hi,

ViewState: Restore after Redirect
http://authors.aspalliance.com/PaulW...ult.aspx?id=10

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU

"jclark0731" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I am trying to redirect to the same page after a post-back is fired to
>ensure
> that the post-back never makes it into history (avoids the
> post-back/refresh
> problem). While doing this, I wish to maintain the view state of the page
> (page contains dynamic controls as well). Has anybody done this before? I
> assume that I need to store the viewstate info in session (as the 64-bit
> encoded string or as the statebag? using sql server session statehandler,
> not
> sure if statebag would be acceptable in that case), and then read from
> that
> session-stored view state when the page loads? Any help would be greatly
> appreciated.
>
> Thanks



 
Reply With Quote
 
 
 
 
=?Utf-8?B?amNsYXJrMDczMQ==?=
Guest
Posts: n/a
 
      04-08-2005
This method doesn't seem to take dynamically created controls into account.

"Teemu Keiski" wrote:

> Hi,
>
> ViewState: Restore after Redirect
> http://authors.aspalliance.com/PaulW...ult.aspx?id=10
>
> --
> Teemu Keiski
> ASP.NET MVP, AspInsider
> Finland, EU
>
> "jclark0731" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> >I am trying to redirect to the same page after a post-back is fired to
> >ensure
> > that the post-back never makes it into history (avoids the
> > post-back/refresh
> > problem). While doing this, I wish to maintain the view state of the page
> > (page contains dynamic controls as well). Has anybody done this before? I
> > assume that I need to store the viewstate info in session (as the 64-bit
> > encoded string or as the statebag? using sql server session statehandler,
> > not
> > sure if statebag would be acceptable in that case), and then read from
> > that
> > session-stored view state when the page loads? Any help would be greatly
> > appreciated.
> >
> > Thanks

>
>
>

 
Reply With Quote
 
Teemu Keiski
Guest
Posts: n/a
 
      04-09-2005
If you make yourself sure that your dynamical controls participate the
viewstatate loading and saving normally, that is they work on nomal page,
they would work with this approach as well.

Can you describe your scenario more accurately?
-
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU


"jclark0731" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> This method doesn't seem to take dynamically created controls into
> account.
>
> "Teemu Keiski" wrote:
>
>> Hi,
>>
>> ViewState: Restore after Redirect
>> http://authors.aspalliance.com/PaulW...ult.aspx?id=10
>>
>> --
>> Teemu Keiski
>> ASP.NET MVP, AspInsider
>> Finland, EU
>>
>> "jclark0731" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> >I am trying to redirect to the same page after a post-back is fired to
>> >ensure
>> > that the post-back never makes it into history (avoids the
>> > post-back/refresh
>> > problem). While doing this, I wish to maintain the view state of the
>> > page
>> > (page contains dynamic controls as well). Has anybody done this before?
>> > I
>> > assume that I need to store the viewstate info in session (as the
>> > 64-bit
>> > encoded string or as the statebag? using sql server session
>> > statehandler,
>> > not
>> > sure if statebag would be acceptable in that case), and then read from
>> > that
>> > session-stored view state when the page loads? Any help would be
>> > greatly
>> > appreciated.
>> >
>> > Thanks

>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
3 ESSENTIAL TOOLS FOR STARTING AND MAINTAINING...3 ESSENTIAL TOOLSFOR STARTING AND MAINTAINING...3 ESSENTIAL TOOLS FOR STARTING ANDMAINTAINING... Oanh Bui Python 0 04-27-2009 12:46 PM
Maintaining view state in datagrid Gomathi ASP .Net Datagrid Control 0 09-27-2005 12:44 PM
Maintaining View State For Dynamically Created Controls Earl Teigrob ASP .Net Building Controls 0 10-07-2004 08:09 PM
Maintaining View State For Dynamically Created Controls =?Utf-8?B?RWFybCBUZWlncm9i?= ASP .Net 0 10-07-2004 08:07 PM
Maintaining view state of table ? ajaymehra ASP .Net 2 03-02-2004 06:22 AM



Advertisments