Using User Controls in FormView templates.
Posted
by ProfK
on Stack Overflow
See other posts from Stack Overflow
or by ProfK
Published on 2010-04-24T12:49:07Z
Indexed on
2010/04/24
12:53 UTC
Read the original article
Hit count: 297
I find the repetition of sets of controls for each of the EditItemTemplate, InsertItemTemplate, and ItemTemplate templates of a FormView to be tedious and risky, in terms duplicating layout and code etc. I would much rather create a xxxDetails user control, and use this in each template, cutting layout and code location down to one location.
However, this introduces several complexities for data binding scenarios. Are there any extablished patterns or practice guides for using user controls in these scenarios?
© Stack Overflow or respective owner