CollectionBase

V

Victor Irzak

Hello group,

I have a class that inherits from CollectionBase.

I have a public property of that class and I want it to be serialized using
[PersistenceMode(PersistenceMode.InnerProperty)].



For some reason it doesn't show up in HTML.

The same class without CollectionBase Serializes perfectly.



How can I overcome this problem?



TIA Victor
 
D

David Jessee

I'm not sure why it would show up in HTML. The only reason you's serialize
an object is so that its state can be de-serialized at a later dtime (after
post-back, for instance). What is the type of this private member that
isn't serializing? Is it serializable? Have you marked your derived Class
as [Serializable()] ?
 
D

David Jessee

that was a stupid response...sorry.


David Jessee said:
I'm not sure why it would show up in HTML. The only reason you's serialize
an object is so that its state can be de-serialized at a later dtime (after
post-back, for instance). What is the type of this private member that
isn't serializing? Is it serializable? Have you marked your derived Class
as [Serializable()] ?


Victor Irzak said:
Hello group,

I have a class that inherits from CollectionBase.

I have a public property of that class and I want it to be serialized using
[PersistenceMode(PersistenceMode.InnerProperty)].



For some reason it doesn't show up in HTML.

The same class without CollectionBase Serializes perfectly.



How can I overcome this problem?



TIA Victor
 
V

Victor Irzak

The problem is that the class that derives from CollectionBase will only
serialize in HTML if it has items in its list.
It will NOT serialize any aditional attributes.
What I want to do is to serialize the properties, but not the items.

Victor


David Jessee said:
that was a stupid response...sorry.


David Jessee said:
I'm not sure why it would show up in HTML. The only reason you's serialize
an object is so that its state can be de-serialized at a later dtime (after
post-back, for instance). What is the type of this private member that
isn't serializing? Is it serializable? Have you marked your derived Class
as [Serializable()] ?


Victor Irzak said:
Hello group,

I have a class that inherits from CollectionBase.

I have a public property of that class and I want it to be serialized using
[PersistenceMode(PersistenceMode.InnerProperty)].



For some reason it doesn't show up in HTML.

The same class without CollectionBase Serializes perfectly.



How can I overcome this problem?



TIA Victor
 
F

Fred Hirschfeld

So are you trying to use a collection as an attribute of a Custom Control
and have the public properties of the Collection class be serialized into
the HTML? Could you give one property example code for this and the expected
HTML results you want?

Fred

Victor Irzak said:
The problem is that the class that derives from CollectionBase will only
serialize in HTML if it has items in its list.
It will NOT serialize any aditional attributes.
What I want to do is to serialize the properties, but not the items.

Victor


David Jessee said:
that was a stupid response...sorry.


David Jessee said:
I'm not sure why it would show up in HTML. The only reason you's serialize
an object is so that its state can be de-serialized at a later dtime (after
post-back, for instance). What is the type of this private member that
isn't serializing? Is it serializable? Have you marked your derived Class
as [Serializable()] ?


Hello group,

I have a class that inherits from CollectionBase.

I have a public property of that class and I want it to be serialized
using
[PersistenceMode(PersistenceMode.InnerProperty)].



For some reason it doesn't show up in HTML.

The same class without CollectionBase Serializes perfectly.



How can I overcome this problem?



TIA Victor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top