Good questions. Compisition is simple normally, because most extension methods return a string of HTML. This string could be a single HTML element a combination. To reduce duplication, you could build up the composite string by calling other extension methods.
I've been putting off controls with AJAX for a while. For inspiration, I'd probably look at the ASP.NET MVC control library by Telerik - I think place JavaScript in separate files but I'm not sure how they reference it from inside their controls. I'll try and come up with some examples ASAP.
2 comments:
How about complicated controls with a lot of composition and client side scripts to deal with Ajax?
What is the best approach?
Thanks
Hardy
Good questions. Compisition is simple normally, because most extension methods return a string of HTML. This string could be a single HTML element a combination. To reduce duplication, you could build up the composite string by calling other extension methods.
I've been putting off controls with AJAX for a while. For inspiration, I'd probably look at the ASP.NET MVC control library by Telerik - I think place JavaScript in separate files but I'm not sure how they reference it from inside their controls. I'll try and come up with some examples ASAP.
Post a Comment