How do you configure the views to able to reference a namespace like System.Web.Mvc without having to do <%@ Import Namespace="System.Web.Mvc" %>? I remember seeing this somewhere but my google skills are failing me at the moment.
+7
A:
Can you add them in web.config? Don't know if this works in MVC, though...
<configuration>
<system.web>
<pages>
<namespaces>
<add namespace="Foo.Blop" />
<add namespace="Bar.Whatever"/>
</namespaces>
</pages>
</system.web>
</configuration>
(update - seems to work fine ;-p)
Marc Gravell
2009-03-16 08:20:38