C# ASP.NET MVC 3 Hyperlink Helper
The other day whilst tidying the views in my personal ASP.NET MVC 3 (C#) project I ended up developing a HTML Helper that creates external hyperlinks, in an attempt to purge my views of hard-coded anchor tags. I've provided an example of it being used, along with a link to the source-code for anyone who is interested.
The HyperlinkExtensions class consists of two extension methods for the HtmlHelper class; allowing the Helpers to work just like the standard HTML Helpers.
If you're unsure how to configure your project to use the class then follow the steps below.
Add the class to your project
Add its namespace to the Pages element in your project's web.config file. Like so...
You should now be able to use the Hyperlink methods in your views.