InstanceDescriptor and Custom Controls

C

ChrisAdams

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.
 

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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top