I've included a PreApplicationStartMethod that adds the namespaces for the extension methods automatically.

using System.Web;
using System.Web.WebPages.Razor;
using Build.Mvc;

[assembly: PreApplicationStartMethod(typeof(PreApplicationStart), "InitializeApplication")]

namespace Build.Mvc
{
    public class PreApplicationStart
    {
        public static void InitializeApplication()
        {
            WebPageRazorHost.AddGlobalImport("Build.Mvc");
            WebPageRazorHost.AddGlobalImport("Build.Mvc.Html");
        }
    }
}

Last edited Dec 16, 2011 at 6:27 AM by grcodemonkey, version 1

Comments

No comments yet.