boutique replica bags up ideas

the best replique rolex and prices here.

julia highlight 99j hair color 10a quality straight human hair lace front wigs 8 - 24 inches pre plucked hairline 13x4 inches lace front brazilian wig onlinefor sale

ASP.NET MVC: How to Import namespace in Razor view?

Updated on     Kisan Patel

To import a namespace in Razor markup, we use using statement as we write in C# class however it should be
prefixed with @.

@using MVC.Utility

To call any method insider that namespace, we do not need to give a fully qualified name. Assuming LogError
class is in this namespace, we can call its method like below.

<p>@LogError.GetDate()</p>

Here we are importing namespace MVC.Utility namespace.

OR

You could also specify namespace in web.config file then you don’t need to import namespace in razor view.

web.config

<system.web.webPages.razor>
   ...
   <pages pageBaseType="System.Web.Mvc.WebViewPage">
     <namespaces>
        ....
        <add namespace="MVC.Utility" />
     </namespaces>
   </pages>
</system.web.webPages.razor>

ASP.NET MVC

Leave a Reply