Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / June 2007

Tip: Looking for answers? Try searching our database.

Cross page posting and viewstate question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
J055 - 13 Jun 2007 17:58 GMT
Hi

I'd like to post a page to another page using LinkButton.PostBackUrl. Then
using another LinkButton on the target page post back to the source page and
restore the controls to the state they were in before the first post to the
target.

Is there an easy way to do this? Perhaps I should consider another approach?

Many thanks
Andrew
Teemu Keiski - 13 Jun 2007 19:02 GMT
Not an easy way, unless they are databound controls and you have state
somwhere in session and ready for redatabinding. Another trick is to save
viewstate to session and use a hack to make the page think it's a postback
and therefor load state from session as if it's loaded from viewstate on
postback, but it's not the easiest thing.

http://authors.aspalliance.com/PaulWilson/Articles/Default.aspx?id=10

Couldn't you just put them on the same page and switch the display with
Panels or MultiView?

Signature

Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net

> Hi
>
[quoted text clipped - 8 lines]
> Many thanks
> Andrew
J055 - 14 Jun 2007 18:19 GMT
Hi Teemu

Thanks for the tip. I hadn't really looked into cross page posting until now
so wasn't sure if it was useful for my requirements. I've used your approach
of using controls on the same page, hiding and unhiding them as necessary,
which is a lot neater and works fine now.

Many thanks
Andrew

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.