There are two methods in which you can add a namespace to a Razor view in ASP.NET MVC 3.

Method 1
The first way is to use the @using statement in .cshtml files, which imports a namespace to the current file only.

Example :-

@using Namespace1
@using Namespace2.SomeClass

Method 2
and the second way is to define these namespaces in the web.config of the View directory of your project.

Example:-

<system.web.webPages.razor>
  <pages pageBaseType="System.Web.Mvc.WebViewPage">
    <namespaces>
      <add namespace="System.Web.Mvc" />
      <add namespace="System.Web.Mvc.Ajax" />
      <add namespace="System.Web.Mvc.Html" />
      <add namespace="System.Web.Routing" />
      .
      <!-- can more more here... -->
    </namespaces>
  </pages>
</system.web.webPages.razor>

or you can add your custom namespace like this too :

<add namespace="Custom.Yasser" />
<add namespace="Custom.Mohsin" />