Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

.NET Forum


You are currently viewing our .NET Forum as a guest. Please register to participate.
Login



Closed Thread
How to maintain ViewState?
Old 07-25-2010, 06:10 PM How to maintain ViewState?
Super Talker

Posts: 112
Trades: 0
Hi all-

Please pardon my dot net newbiness. How can I maintain the values a user has chose in a control (ie a radio button list within a databound gridview) once the user has navigated away from the page to a 2nd page and then returns back to the first page via a menu link?

Right now all values are being cleared out when returning, I think because the page reloads and the databind repopulates the gridview.

Tried 'If Not Page.IsPostback Then' but I think that must only apply to an auto postback from a control on the page. Unless I did it wrong, which is a distinct possibility.

Or does the answer lie within viewstate or the session state?

Thanks!

(using VB and LINQ to SQL)
blogdog is offline
View Public Profile
 
 
Register now for full access!
Old 07-25-2010, 06:14 PM Re: How to maintain ViewState?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,384
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Use session variables or cookies
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
View Public Profile Visit chrishirst's homepage!
 
Old 07-25-2010, 06:32 PM Re: How to maintain ViewState?
Super Talker

Posts: 112
Trades: 0
OK, can I use session variables just like regular variables? ie an array?

So I could declare an array or two and use those as temporary containers until it's time to save the whole thing to the database.
blogdog is offline
View Public Profile
 
Old 07-25-2010, 06:43 PM Re: How to maintain ViewState?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,384
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
http://msdn.microsoft.com/en-us/library/ms178581.aspx
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
View Public Profile Visit chrishirst's homepage!
 
Closed Thread     « Reply to How to maintain ViewState?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.13523 seconds with 12 queries