(+N) Consulting Inc.

Consulting | Software Solutions | Training

MVC + ASP.Net template control and user control

Seeing that I can use a DataBoundControl such as DataList, and binding it to a source control is achievable – what next? Data bound controls contain various templates. The usual suspects are the item template and alternating template (for a repeating object, with possible varied style), the header and the footer templates (for enclosing HTML pre/post wrap or header / footer effects). Under MVC, all events are out the window. So we're not concerned at all with event hookup. We might want to provide the various "modes" of display (Edit, Create, Delete etc) which align well with CRUD command structure and may map to MVC quite naturally. But for starters, my project's requirements simply required styling of the repeating item to be ea... [More]