The question is simple as stated in the title: Is there a way of having razor helpers outside of \'App_Code\'?
Example ( HtmlEx.cshtml file ):
@hel
sure, you can put them anywhere in your code or project structure. in the file where you create your helper be sure to include using System.Web.Mvc.
then just normally extend the Helper class like this:
namespace System.Web.Mvc
{
static class HtmlHelperExtensions
{
public static IHtmlString MyNewHelper(this HtmlHelper helper, string someParam)
{
// do something
}
}
}