473,378 Members | 1,617 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

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
3 2764
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: Thomas G. Marshall | last post by:
This message is sent to these newsgroups because they are no longer valid: comp.lang.java comp.lang.java.api comp.lang.java.bugs comp.lang.java.misc comp.lang.java.setup comp.lang.java.tech
10
by: Rada Chirkova | last post by:
Hi, at NC State University, my students and I are working on a project called "self-organizing databases," please see description below. I would like to use an open-source database system for...
0
by: Dinesh Upare | last post by:
Hi, I want to fire events of Datatgrid without maintaining the view state. If I disable the ViewState then the events are not fired. The reason I don't want to maintain view state is because its...
0
by: Earl Teigrob | last post by:
I am building a custom control that I want to server as a container for child controls that can be dynamically added to this control. I can persist the child controls that are added to my custom...
1
by: Sospeter | last post by:
Hi Ken, I have done that but still experiencing same problem. Tried the following i.e. turning smartnavigation = false and using server.transfer as below but nothing works. Please help. ...
0
by: Sam | last post by:
Folks, Attached I am sending 2 URL's from MSFT ASP.net Quick Start Tutorial Web Site. 1) Run it URL: http://www.asp.net/QuickStart/aspnet/samples/data/GridViewMasterDetailsInsertPage_vb.aspx 2)...
1
by: Sam | last post by:
Attached I am sending 2 URL's from MSFT ASP.net Quick Start Tutorial Web Site. 1) Run it URL: http://www.asp.net/QuickStart/aspnet/samples/data/GridViewMasterDetai... 2) View Source URL:...
1
by: Joe Kovac | last post by:
Hi! I have an edit page and a view page. When I edit I sometimes want to see the results graphically in the view page. Therefore I use: Response.Redirect("ViewPage.aspx"); Then I go back,...
3
by: Alejandro | last post by:
Hi: I want to redirect stdout to a textctrl I have. From what I read in the wxpython documentation, I can use the wxLogTextCtrl class to do this. I am doing the following: class...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.