views:

45

answers:

2

I would like to create simple controls that can be Easily reused across applications. Is there a current set of best practices or patterns for creating such controls. Examples of such controls could be Paging, List or Grid display, etc...

I'm not looking to make controls with tons of options just really simple controls that I can add to my own library to speed up development of sites. I'm just not sure how to go about it with MVC.

Thanks!

+1  A: 

The concept of controls is more appropriate to classic ASP.NET WebForms applications. In ASP.NET MVC action filters and helpers (using TagBuilder) are more commonly used for creating reusable parts. You may take a look at MVCContrib for many examples of Paging, List, Grid and other components.

Darin Dimitrov
A: 

I think HtmlHelpers and UrlHelpers in their own assembly and probably javascript files (think jQuery plugins) are your best control-like levels of reuse across projects.

Joe Wilson