Convert string to unknown type

Aug 31 2010 9:08 AM
Hi,

I'm designing a web application and I have a field that comes from a db which has its own type. To show the content of this field on the web, I can type:

this.textbox.Value = MyObject.Field.ToString();

But I don't know how to put the value back from the textbox into the field.... if I try to do this:

MyObject.Field = this.textbox.value

It complains it can't convert from string into MyObject.Field.Type, and it does not allow a cast.

What can I do??

Thanks!!

Answers (3)