CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > windows_hosting.hosting_open_forum Tags:
Item Type: NewsGroup Date Entered: 2/25/2005 6:27:04 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 0 Views: 16 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
1 Items, 1 Pages 1 |< << Go >> >|
FfejWhitey
Asp.Net User
Viewstate persistence problem2/25/2005 6:27:04 PM

0/0

I've been looking thru these forums to make sure I had it right for using viewstate to persist data in my user control. Here's the code I have:

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If IsPostBack Then
LoadState()
End If
End Sub

Private Sub SaveState()
ViewState("exportData") = exportData
End Sub

Private Sub LoadState()
exportData = ViewState("exportData")
End Sub

Public Property DataSource() As String 'DataSet
Get
Return exportData
End Get
Set(ByVal Value As String) 'As DataSet)
exportData = Value
SaveState()
End Set
End Property

'I don't even think this does anything valuable
Private Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.PreRender
SaveState()
End Sub

This control is placed on another page and all that page does is set the DataSource property of my control. In debugging, I can see that, in fact the value is put into the viewstate. There is also a button on my control and sometime between when that button is clicked and the pageload hits the viewstate value that I put in there is wiped out and Viewstate("exportData") = Nothing. Am I missing something I need to do to include the viewstate in the parent page or something. I have been searching forums for hours but I can't seem to find this particular issue. Any help is greatly appreciated. Thanks!
1 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
ASP.NET 2.0 Cookbook Authors: Michael A. Kittel, Geoffrey T. Leblond, Pages: 989, Published: 2005
The Book of Visual Basic 2005: .NET Insight for Classic VB Developers Authors: Matthew MacDonald, Pages: 490, Published: 2006
Core Internet Application Development with ASP.NET 2.0 Authors: Randy Connolly, Pages: 1049, Published: 2007
Build Your Own ASP.NET 2.0 Web Site Using C# & VB: The Ultimate ASP.NET Begginner's Guide Authors: Cristian Darie, Zak Ruvalcaba, Pages: 689, Published: 2006
Visual Basic .NET Developer's Guide to ASP.NET, XML, and ADO.NET Authors: Jeffrey P. McManus, Chris Kinsman, Pages: 592, Published: 2002
Spring Recipes: A Problem-Solution Approach Authors: Gary Mak, Pages: 752, Published: 2008
ASP.NET 2.0 Website Programming: Problem-design-solution Authors: Marco Bellinaso, Pages: 576, Published: 2006
Professional C# Authors: Simon Robinson, Christian Nagel, Karli Watson, Jay Glynn, Morgan Skinner, Bill Evjen, Pages: 1224, Published: 2004
Professional Java Development with the Spring Framework Authors: Rod Johnson, Juergen Hoeller, Alef Arendsen, Thomas Risberg, Colin Sampaleanu, Pages: 644, Published: 2005
A First Look at ASP.NET V. 2.0 Authors: Alex Homer, Dave Sussman, Rob Howard, Pages: 528, Published: 2004

Web:
Viewstate On The Server Mar 23, 2006 ... We considered using our configuration table to manage this value so we could change viewstate persistence on the fly, but determined that ...
Efficient Server-Side View State Persistence Aug 5, 2008 ... No, to solve this view state problem once and for all, ... The view state persistence mechanism needs to be identified by a specific user ...
ViewState Compression and Persistence by Joseph A. De Guzman article,ViewState,Compression,Persistence .... The article is about ViewState Compression and Persistence. ...
ASP viewstate persistence ASP viewstate persistence. What would be the correct way to do this: Page A: ComboBox with values A/B/C Button which redirects to page B. ...
ASP.NET.4GuysFromRolla.com: Persisting Page State in ASP.NET 2.0 Jan 17, 2007 ... NET version 1.x, view state persistence could be customized by extending the Page class and overriding its SavePageStateToPersistenceMedium ...
CodeProject: Efficient Server-Side View State Persistence. Free ... The View State persistence mechanism needs to be identified by a specific ..... on the system for a full work day (10 hours) without any problems at all. ...
marklio - File-Based ViewState Persistence Solution "Updating my "multi-request-safe" File-based ViewState persistence for Whidbey" ... [Trackback] http://www.marklio.com/marklio/PermaLink,guid ...
Persistent ViewState Talk about Persistent ViewState. ... Go Back, Velocity Reviews > Newsgroups > ASP Net ยท Reload this Page Persistent ViewState ...
Efficient Server-Side View State Persistence, Two Dot DOH!! Aug 6, 2008 ... Efficient Server-Side View State Persistence, Two Dot DOH! ... Everything works as expected; Two Browsers (IE7 / FF3) - No problem at all. ...
.NET: Increase Application Perf with ViewState Persistence Tweaks ... .NET: Increase Application Perf with ViewState Persistence Tweaks and Optimizations. I was amazed most of us hate ASP.NET ViewState for its default poor ...




Search This Site:










login error.

clone portal layout and contents

date format change

how to develop a web application that can utilize hardware device on client's side.

treeview nodes not based on roles

web application namespace

installing and uninstalling modules problems

.net framework compatibility

sending sms thru my web form

body onload set in codebehind from content page?

migrating from 2.1.2 to 3.1 how ?????

german language packs for dotnetnuke 3.3.1 & 4.3.1 available

www.smcculloch.net - input string was not in a correct format.

anything with global.asax?

unable to cast object of type 'system.uint32' to type 'system.string'?

login help plz

5 exceptions for breakfast--i don't understand any of them, but i need help!

sql project

arrays, arrays, arrays

resource directory manager 2.0 dnn pa - help

wierd problem

content page problem

what is maximum asp background in dnn???

"the state information is invalid for this page"

some questions

hidding the module title along with the module

is there a way to upload files w/o admin rights?

is there anyway to set a menu item to selectable, but not clickable?

how to make multi-lingual website ?

reflection of component in web application

 
All Times Are GMT