How to import a namespace in Razor View Page

asp.netasp.net-mvc-3razorwebmatrix

How to import a namespace in Razor View Page?

Best 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.