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
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