Top ASP.NET Items

Sponsors

Archives

Instantiating components on template markup

All client-side template engines enable you to create HTML (fell free to go ‘duh’). What they don’t all allow is the creation of event handlers and components over the markup they generate. The general approach with those engines is to do a second pass of code over the markup to create handlers and components. This is quite unfortunate as this generally requires some knowledge of the markup (which plays against separation of concerns) or something like the introduction of marker CSS classes into the markup. For our own template engine, we wanted event handler creation and component instantiation to be first class scenarios, and we wanted both to be possible from imperative code as well as declarative code. Imperative code blocks Let’s start Read More...

Read the complete post at http://weblogs.asp.net/bleroy/archive/2008/11/28/instantiating-components-on-template-markup.aspx