Last post Aug 23, 2008 07:59 PM by exsurgo
Aug 23, 2008 04:40 PM|exsurgo|LINK
If there a way to pass paramters to the DynamicControl that can be read by the FieldTemplates?
Maybe by deriving a class from DynamicControl and adding other properties. An example would be:
<my:DynamicControl runat="server" Required="False" DataField="..." />
That way you would have the option to ajust settings at the UI layer OR within the entity model.
But then, how would the FieldTemplateUserControl be able to read the 'Required' property of the Dynamic Control?
Aug 23, 2008 05:23 PM|marcind|LINK
There is a way. If you declare a public property on your field template class (for example named Required in your case) then DynamicControl will automatically set that property to the value in your markup.
Aug 23, 2008 07:59 PM|exsurgo|LINK
Awsome, that's just what I needed. Thanks very much!!