Using User Controls in FormView templates.
- by ProfK
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?