I am currently trialling Umbraco and I have created a few .net User Controls and classes.
One of these controls is a Link Item which renders a Hyperlink (rather pointless I know, but this is purely for illustration purposes). To achieve this I have 2 User Controls...
LinkItem.ascx
LinkEditor.ascx
These each have properties exposed which are of type 'Link', a simple .net class consisting of Text, URL and Target properties. I've manged to get the editor to persist the data I put in with no problems at all (seperate fields for each property build a Link object and save it by serializing it to text).
However, when I come to pass the object through to the view control (LinkItem.ascx) the property I pass through is empty and isn't returning any data.
I'd post up some code but I don't really know where to start.
Persisting Complex .net Types
I am currently trialling Umbraco and I have created a few .net User Controls and classes.
One of these controls is a Link Item which renders a Hyperlink (rather pointless I know, but this is purely for illustration purposes). To achieve this I have 2 User Controls...
LinkItem.ascx
LinkEditor.ascx
These each have properties exposed which are of type 'Link', a simple .net class consisting of Text, URL and Target properties. I've manged to get the editor to persist the data I put in with no problems at all (seperate fields for each property build a Link object and save it by serializing it to text).
However, when I come to pass the object through to the view control (LinkItem.ascx) the property I pass through is empty and isn't returning any data.
I'd post up some code but I don't really know where to start.
is working on a reply...