I’m working on my first asp.net mvc application and I’m using custom helpers like the Html.Label() from the example on the official site.
For having access to Html.Label, I have to place
<%@ Import Namespace='BRG.Helpers' %>
at the top of every view.
Is there a way to avoid having to do that? I’ve read somewhere someone mentioning something about the web.config, but I can’t find it anywhere..
Anyone can help me?
You can add the namespace to your
web.configinconfiguration\system.web\pages\namespaceslike:You can do this in either the root
web.configor the one in theViewsdirectory.