Property of abstract type doesn't deserialize properly

Discussion in 'ASP .Net Web Controls' started by Joel, Jun 6, 2006.

  1. Joel

    Joel Guest

    Does anybody know how the ASP.NET designer serializes/deserializes
    properties of abstract type? I have a property of type Editor.
    TextEditor and ImageEditor are derived from Editor which is abstract.
    On my control, I have a property that is of type Editor.
    public Editor Editor
    {}

    When it serializes it to the design time HTML it does so like this:

    <DateColumn Hidden="False" Enabled="False">
    <Editor DatasourceId="dadasdfsf"></Editor>
    </DateColumn>

    However, it doesn't save any type information. When I try open the form
    again in the design view it tries to create an Editor object and
    obviously fails since Editor is abstract.

    How do I hook the CreateInstance for this? I've tried TypeConverters
    but it wont call my CreateInstance method.

    Any ideas would be appreciated. I'm losing it on this one. :(

    Thanks,
    Joel
    Joel, Jun 6, 2006
    #1
    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. DaKoadMunky
    Replies:
    4
    Views:
    537
    Lee Weiner
    Apr 20, 2004
  2. Matthias Kaeppler
    Replies:
    1
    Views:
    418
    R.F. Pels
    May 22, 2005
  3. Sameer
    Replies:
    4
    Views:
    573
    Roedy Green
    Aug 31, 2005
  4. Uzytkownik
    Replies:
    3
    Views:
    577
    Uzytkownik
    Apr 3, 2005
  5. Replies:
    0
    Views:
    93
Loading...

Share This Page