locked
Passing Parameters to DynamicControl RRS feed

  • Question

  • User1561875705 posted

    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?

     

    Thanks!!

    Saturday, August 23, 2008 4:40 PM

Answers

  • User-797310475 posted

     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.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, August 23, 2008 5:23 PM

All replies

  • User-797310475 posted

     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.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, August 23, 2008 5:23 PM
  • User1561875705 posted

    Awsome, that's just what I needed.  Thanks very much!!

    Saturday, August 23, 2008 7:59 PM