467,925 Members | 1,754 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,925 developers. It's quick & easy.

Redirect to self while maintaining view state

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
Nov 19 '05 #1
  • viewed: 2583
Share:
3 Replies
Hi,

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

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

"jclark0731" <jc********@discussions.microsoft.com> wrote in message
news:F3**********************************@microsof t.com...
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

Nov 19 '05 #2
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" <jc********@discussions.microsoft.com> wrote in message
news:F3**********************************@microsof t.com...
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


Nov 19 '05 #3
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" <jc********@discussions.microsoft.com> wrote in message
news:AC**********************************@microsof t.com...
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" <jc********@discussions.microsoft.com> wrote in message
news:F3**********************************@microsof t.com...
>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


Nov 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

16 posts views Thread by Thomas G. Marshall | last post: by
reply views Thread by Dinesh Upare | last post: by
reply views Thread by Earl Teigrob | last post: by
1 post views Thread by Sospeter | last post: by
1 post views Thread by Joe Kovac | last post: by
3 posts views Thread by Alejandro | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.