开发者

Possible to add shortcut names to razor namespace imports in MVC 3 web.config

Similar to using Shortcut = System.Whatever; in the cshtml I have so far been out of luck doing something similar 开发者_Python百科in the webconfig

<pages>
  <namespaces>
    <add namespace="System.Web.Routing" as="Routing" />
  </namespaces>
</pages>

Something like that...Is it possible at all?


No, it is not possible in Razor because there is no mechanism in C# that would allow you to redefine a namespace.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜