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

Discussion in 'ASP .Net Web Controls' started by Ralf Müller, Dec 13, 2004.

  1. Ralf Müller

    Ralf Müller Guest

    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
    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
    Ralf Müller, Dec 13, 2004
    1. Advertisements

  2. Ralf Müller

    Teemu Keiski Guest

    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.
    Teemu Keiski, Dec 19, 2004
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.