Can you have a Dynamic Data Field which consists of a list of fields?

Posted by Telos on Stack Overflow See other posts from Stack Overflow or by Telos
Published on 2009-06-01T22:00:35Z Indexed on 2010/04/01 14:03 UTC
Read the original article Hit count: 294

This is a purely theoretical question (at least until I start trying to implement it) but here goes.

I wrote a web form a long time ago which has a configurable section for getting information. Basically for some customers there are no fields, for other customers there are up to 20 fields. I got it working by dynamically creating the fields at just the right time in the page lifecycle and going through a lot of headaches.

2 years later, I need to make some pretty big updates to this web form and there are some nifty new technologies. I've worked with ASP.NET Dynamic Data just a bit and, well, I half-crazed plan just occurred to me:

The Ticket object has a one-to-many relationship to ExtendedField, we'll call that relationship Fields for brevity.

Using that, the idea would be to create a FieldTemplate that dynamically generated the list of fields and displayed it.

The big questions here would probably be:

1) Can a single field template resolve to multiple web controls without breaking things?

2) Can dynamic data handle updating/inserting multiple rows in such a fashion?

3) There was a third question I had a few minutes ago, but coworkers interrupted me and I forgot. So now the third question is: what is the third question?

So basically, does this sound like it could work or am I missing a better/more obvious solution?

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about asp.net-dynamic-data