InstanceDescriptor and Custom Controls

Discussion in 'ASP .Net Building Controls' started by ChrisAdams, Aug 20, 2004.

  1. ChrisAdams

    ChrisAdams Guest

    Hi Guys,

    I'm trying to write a server control that exposes as one of it's properties
    an object.

    I've created a TypeConvertor that converts from a string representation to
    an instance of my object, and have also implemented the converstion from the
    object to an InstanceDescriptor.

    When I create the InstanceDescriptor, I am passing in the parameters for the
    default no argument constructor of my object, and the third parameter to
    specify that the object can not be fully created from the InstanceDescriptor
    - which should force the serializer to output code for the properties of my
    object as well....

    return new InstanceDescriptor( XmlDocType.GetConstructor(
    System.Type.EmptyTypes ), null, false);

    However the code that is generated for the asp.net does not have any code
    for setting the propertiess of my object.

    I know I could just create a constructor that takes in the values, and
    return the relevant InstanceDescriptor, but I would like to get it working
    the other way first. Does anyone know if this is possible, and where I could
    be gonig wrong?

    Also I've looked at implementing my own CodeDomSerializer for my object, but
    cannot get the asp.net to actually call my implementation - again if any
    knows where I am going wrong with this, would be helpful to hear from you.

    Thanks.

    Chris.
    ChrisAdams, Aug 20, 2004
    #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. Axel Dahmen
    Replies:
    1
    Views:
    474
    Teemu Keiski
    Nov 12, 2003
  2. Dag
    Replies:
    5
    Views:
    465
    David Jessee
    May 8, 2004
  3. user
    Replies:
    1
    Views:
    423
    Kevin Spencer
    Jul 19, 2007
  4. rodchar
    Replies:
    0
    Views:
    381
    rodchar
    Nov 26, 2007
  5. Replies:
    3
    Views:
    358
    Angel
    Feb 6, 2008
Loading...

Share This Page