Writing HTML Extensions in MVC

Where should I write my own HTML extension methods when the HTMLHelper class is in metadata (Assembly System.Web.Mvc.dll)?

Should I update the HTMLHelper in the DLL?

+3


source to share


1 answer


No, just declare your methods like any other extension method. And include the namespace of your extension class in your file Web.config

. You can then call your methods just like you call any other extension method HtmlHelper

.



+3


source







All Articles