473,386 Members | 1,708 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,386 software developers and data experts.

help - serilization

I have a class that I want to serialize to into the viewstate of an aspx
form.
I've specified the [Serializable] attribute on top of the class definition,
compiled but when I browse the page I get an excepiton that the class must
be marked as Serializable.
Can this have something to do with some of the members not beeing of
serializable types? I thought it would be neat to put my custom object in
the viewstate. How do I solve this?
Does anyone have a link that provides me with some in depth information
about this?

cheers,
mortb
Nov 16 '05 #1
1 1206
mortb,

That's exactly what it is. When you mark your class as serializable,
every field must be marked as serializable as well. If you want to indicate
that certain members of your class should not be serializable, then you can
adorn them with the NonSerialized attribute.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"mortb" <mo****@hotmail.com> wrote in message
news:OS**************@TK2MSFTNGP11.phx.gbl...
I have a class that I want to serialize to into the viewstate of an aspx
form.
I've specified the [Serializable] attribute on top of the class definition, compiled but when I browse the page I get an excepiton that the class must
be marked as Serializable.
Can this have something to do with some of the members not beeing of
serializable types? I thought it would be neat to put my custom object in
the viewstate. How do I solve this?
Does anyone have a link that provides me with some in depth information
about this?

cheers,
mortb

Nov 16 '05 #2

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

Similar topics

21
by: Dave | last post by:
After following Microsofts admonition to reformat my system before doing a final compilation of my app I got many warnings/errors upon compiling an rtf file created in word. I used the Help...
6
by: wukexin | last post by:
Help me, good men. I find mang books that introduce bit "mang header files",they talk too bit,in fact it is my too fool, I don't learn it, I have do a test program, but I have no correct doing...
3
by: Colin J. Williams | last post by:
Python advertises some basic service: C:\Python24>python Python 2.4.1 (#65, Mar 30 2005, 09:13:57) on win32 Type "help", "copyright", "credits" or "license" for more information. >>> With...
6
by: amethyste | last post by:
hello, This is my sample (simplified): public class Binom { public string _Value;
7
by: Corepaul | last post by:
Missing Help Files When I enter "recordset" as the keyword and search the Visual Basic Help index, I get many topics of interest in the resulting list. But there isn't any information available...
5
by: Steve | last post by:
I have written a help file (chm) for a DLL and referenced it using Help.ShowHelp My expectation is that a developer using my DLL would be able to access this help file during his development time...
3
by: RJA | last post by:
Hiyas, Using VS .net 2003. Setting up a Webservice that accepts 3rd party vendor designed XML requests and returns a filled XMLDocument with response data. Vendor XSDs were serialize into...
8
by: Mark | last post by:
I have loaded Visual Studio .net on my home computer and my laptop, but my home computer has an abbreviated help screen not 2% of the help on my laptop. All the settings look the same on both...
7
by: Mike9900 | last post by:
If you do .NET Remoting and Binary Serilization with DataSet it does not work. If you set the Serialization type to Binary on DataSet, it does not seralize it correctly on windows xp. To do this...
10
by: JonathanOrlev | last post by:
Hello everybody, I wrote this comment in another message of mine, but decided to post it again as a standalone message. I think that Microsoft's Office 2003 help system is horrible, probably...
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: 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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.