How To Import A Namespace In Razor View Page




In some situation, we may have to Import the Namespace In Razor View Page. This can be done in either Page Level or Application level. Here we would discuss how to import the Namespace in Areas also.




How To Import A Namespace In Razor View Page In MVC, Import A Namespace In Razor View Page, Import A Namespace In View Page In MVC, Razor View Page, Razor Engine, MVC, Asp.Net, Namespace In Razor View Page In MVC, Namespace In Web.Config In MVC, PHP, HTML, CSS

As shown in the above figure, just write the NameSpace with @using provided on View. For implementing this on Areas, copy the above code on Views inside Areas.




How To Import A Namespace In Razor View Page In MVC, Import A Namespace In Razor View Page, Import A Namespace In View Page In MVC, Razor View Page, Razor Engine, MVC, Asp.Net, Namespace In Razor View Page In MVC, Namespace In Web.Config In MVC, PHP, HTML, CSS

On the web.config inside the View Folder, write down the above code. This will implement the Namespace for all Views. For Areas, write the above code on web.config available on each View folder. This will definitely resolve the Issue.