|
-
Aug 8th, 2002, 09:19 AM
#1
Thread Starter
Junior Member
convert string to a control type
Hi All,
Using Win2k
When I return a db column via a datareader to my app I'll see that rdr("ControlType") contains "Label" or "Textbox", etc. I'd like to use this string to as a datatype for a variable. I have tried...
Dim ct As Control = CType(TypeDescriptor.GetConverter(GetType(Control)).ConvertFromString(rdrFormBuild("controltype").To String), Control)
but that returns Nothing. I know that for a color "red" you can use the FromName method to return a valid color object so there must be something like this for other objects??? Any ideas?
I'll also post on ASP.NET
Thanks,
David X
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|