Help needed for "generic" System.Object Converter

  • Thread starter microsoft.newsgroups.com
  • Start date
M

microsoft.newsgroups.com

Hi, I have custom web server control with one property being of type
System.Object.

At design time, only string values are allowed to be entered in the property
window. If "StringConverter" is used for the TypeConverter attribute, a user
can enter string values for this property and those values get serialized to
the aspx.

However, at run time an exception gets raised (as StringConverter can only
convert to a string, not from a string).

The question is: how to build a custom type converter for the generic
System.Object type/class? I guess this should inherit from StringConverter
but am unsure how to code the ConvertTo and CanConvertTo methods?


~ Gajba
 

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,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top