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

  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
    ASP.NET MVP, AspInsider
    Finland, EU

    "Ralf Müller" <> wrote in message
    news:...
    > 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
    >
    >
     
    Teemu Keiski, Dec 19, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. jeff
    Replies:
    0
    Views:
    1,552
  2. jeff
    Replies:
    3
    Views:
    1,723
    Scott
    Jun 26, 2003
  3. vlsidesign
    Replies:
    26
    Views:
    1,048
    Keith Thompson
    Jan 2, 2007
  4. SM
    Replies:
    9
    Views:
    533
  5. Casey Hawthorne
    Replies:
    18
    Views:
    654
    Beej Jorgensen
    Nov 6, 2009
Loading...

Share This Page