473,326 Members | 2,102 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,326 software developers and data experts.

Storing custom collection in ViewState

Hi all,

I have a custom collection derived from
System.Collections.Specialized.NameObjectCollectio nBase.

NameObjectCollectionBase already implements ISerializable, so it
should be easy to store in the ViewState, right?

I'm, however, unable to do so. I can add the collection object
successfully, but with the page reload, it tells me the ViewState is
corrupted.

It's the infamous "The viewstate is invalid for this page and might be
corrupted" message.

I've confirmed with a viewstate decoder that the viewstate is indeed
corrupt, but I have no idea why.

Please have a look at

http://www.sun.ac.za/sms/CustomColle...nViewState.zip

It's a replication of my problem.

I'm running VS.NET 2003.

thnx!
Francois Botha
Nov 18 '05 #1
1 1989
"igitur" <i_*********@email.com> wrote in message
news:e0**************************@posting.google.c om...
Hi all,

I have a custom collection derived from
System.Collections.Specialized.NameObjectCollectio nBase.

NameObjectCollectionBase already implements ISerializable, so it
should be easy to store in the ViewState, right?

I'm, however, unable to do so. I can add the collection object
successfully, but with the page reload, it tells me the ViewState is
corrupted.

It's the infamous "The viewstate is invalid for this page and might be
corrupted" message.

I've confirmed with a viewstate decoder that the viewstate is indeed
corrupt, but I have no idea why.

Please have a look at

http://www.sun.ac.za/sms/CustomColle...nViewState.zip

It's a replication of my problem.

I'm running VS.NET 2003.


You may want to look at
http://msdn.microsoft.com/library/de...sp11222001.asp.
It mentions the idea of writing your own TypeConverter as opposed to using
serialization for ViewState.
--
John Saunders
johnwsaundersiii at hotmail
Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Pham Nguyen | last post by:
Has anyone seen an example of a textbox server control that has built-in client-side validation? I'd like to build a server control that extends the System.Web.UI.WebControls.TextBox class to allow...
0
by: Tom | last post by:
I am developing a page that will contain multiple instances of a Composite Custom Control that i have developed. The problem is that the user will determine at run time how many of the control...
2
by: BluDog | last post by:
Hi I have a created a custom web control called ImageBrowser, extract is below: <Code> #Region "Properties" Public Property Images() As ImageCollection
21
by: One Handed Man \( OHM - Terry Burns \) | last post by:
When using a custom control. In order to check and see if values have changed one has to implement the IPostBackDataCollection interface. The values returned for the control seem to be simply a...
3
by: Chris Newby | last post by:
I have a very simple custom control that derives from WebControls.Panel and implements INamingContainer. It appear that controls created as children of my custom control are having ViewState...
7
by: Shimon Sim | last post by:
I have a custom composite control I have following property
3
by: Adrian Parker | last post by:
v1.1 and v2.0 We have a problem with viewstate not being stored. What's happening is that we create controls in CreateChildControls and add them to a container on the page (whether it be a...
3
by: Mark | last post by:
I'm consuming a webservice that makes a simple object available. The object class is marked in the web service as . I have a web application that consumes and uses this web service's class. When...
11
by: =?Utf-8?B?bWljaGFlbCBzb3JlbnM=?= | last post by:
I have worked with application settings in VS2005 and C# for awhile, but usually with standard types. I have been trying to store a custom container/class/type in an application setting and I have...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.