How do I get the value of a DynamicControl?

Posted by Telos on Stack Overflow See other posts from Stack Overflow or by Telos
Published on 2009-06-10T20:10:19Z Indexed on 2010/05/15 22:02 UTC
Read the original article Hit count: 321

I'm using ASP.NET Dynamic Data functionality to do something a little weird. Namely, create a dynamic list of fields as children of the main object.

So basically I have Ticket.Fields. The main page lists all the fields for Ticket, and the Fields property has a DynamicControl that generates a list of controls to collect more data.

The tricky part is that this list ALSO uses Dynamic Data to generate the controls, so each field can be any of the defined FieldTemplates... meaning I don't necessarily know what the actual data control will be when I try to get the value.

So, how do I get the value of a DynamicControl?

Do I need to create a new subclass of FieldTemplate that provides a means to get at the value?

© Stack Overflow or respective owner

Related posts about asp.net-3.5

Related posts about dynamicdata