Question

I'm interested in seeing what custom extensions other developers have created for the ASP.NET MVC HtmlHelper class.

I think Microsoft got off to a great a start, but as usual, left a lot of open holes to fill!

Looks like I am going to have to create some for rendering images, rendering action links as images, and so on.

Thought it might be beneficial to actually put a list together and save some other developers some time and effort, and I'll be honest, save me some time as well. =)

If you have any website links to other extension methods for the HtmlHelper class please provide them!

Was it helpful?

Solution

You should check the MVC-Contrib project on Codeplex...

Also, I just found this paging extension to the HtmlHelper which looks pretty cool, although I've not used it yet.

OTHER TIPS

I wrote an article about building custom controls in ASP.NET MVC, and I actually use the "Rollup Grid View" that I built in there.

I wrote a post to gather useful MVC HtmlHelpers and share them with others; we can grow it up!

Take a look: http://sharplife.net/2008/11/14/UsefulHtmlHelpersForASPNETMVC.aspx (or http://tinyurl.com/mvchelper to remember easily!).

I made quite a few for a project I did at work. The ones that I can think off the top of my head were:

ActionImage, which was the unholy love child of ActionLink and Image. ScriptBlock, which could write out a JavaScript script block based on some parameters from the ASP.NET. Textile, which would take a string marked up in Textile markup and write out that markup as XHTML produced by a Textile library.

There were a few other more specific ones as well, but I think it's a really neat way of encapsulating blocks of tags.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top