How do I import a namespace in Razor View Page?
asp.net, asp.net-mvc-3, razor, webmatrix
Solution
Finally found the answer.
@using MyNamespace
For VB.Net:
@Imports Mynamespace
Take a look at @ravy amiry's answer if you want to include a namespace across the app.
Problem
How to import a namespace in Razor View Page?
Related problems
- How to configure invariant culture in ASP.NET globalization?
- How to add extra namespaces to Razor pages instead of @using declaration?
- Where and how is the _ViewStart.cshtml layout file linked?
- How to alias a type with a using directive in my Razor view?
- How do you implement a @using across all Views in Asp.Net MVC 3?