Mark Redman
Mark Redman

Reputation: 24515

Is there an equivalent to the web.config in the Views folder for asp.net MVC 6?

In pre asp.net 4 and below, there is a web.config in the views folder to include references across all views, what is the asp.net equivalent of this?

Upvotes: 2

Views: 696

Answers (1)

Joe Audette
Joe Audette

Reputation: 36716

If you create a new asp.net project in vs 2015 it should create an _ViewImports.cshtml in the root of the Views folder

@using example.WebApp
@using Microsoft.AspNet.Identity
@using cloudscribe.Web.Navigation
@addTagHelper "*, Microsoft.AspNet.Mvc.TagHelpers"

where you can add any namespaces for things you want to be available in all views

Upvotes: 4

Related Questions