serializing webcontrols isn't really a good practice - is it?

R

Ralf Müller

Hi folks!

I am developing a custom TreeView and I have got a problem with the
serialization of my TreeViewModel:
From that model I fire DataChangedEvents but as soon as I set a Control
(here: my TreeView) to handle this DataChangedEvent, the model cannot be
serialized anymore. I guess that is because my TreeViewControl is not
serializable.
What I am asking myself (and you) now is the following: Should I really make
a Control serializable? I don't think it is a good pratice to do so since
none of the built in ASP.NET WebControls seems to be serializable. What can
I do apart from serializing?

Thanx in advance!



Greetings, Ralf
 
T

Teemu Keiski

Usually controls do not serialize themselves but instead store their state
to external medium from which they can also be completely restored.
ViewState is an example of this.
 

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,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top