bri189a Posted October 21, 2005 Posted October 21, 2005 I'm working on a custom server control and have a component I created that is a property of this control. If I manually (in code) set the property, everything is great - if I let the desinger do it, in the html it properly assigns a value, but when the page renders I get the following error: Unable to generate code for a value of type 'MyComponentName'. This error occurred while trying to generate the property value for ThePropertyMentioned - this happens before the constructor for that component is even called...so I don't know what .NET is trying to do. No other custom properties of the control have this problem; but they're simple native types. I googled the main bits of the error and got jack. And I can't figure out what the problem is, and while the control works great if I set the property manually; it's annoying - it would be like manually having to set the DataSource of a drop down list rather than letting the designer do it. Any ideas? Quote
Administrators PlausiblyDamp Posted October 21, 2005 Administrators Posted October 21, 2005 I think you will need to specify or possibly create a TypeConvertor to handle rendering of the class to the underlying HTML. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.