asp.netasp.net-mvc-3razorwebmatrix

How do I import a namespace in Razor View Page?


How to import a namespace in Razor View Page?


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.