lundi 17 avril 2017

The name 'Url' does not exist in the current context in Areas Folder

I've WebAPI project. I've created Areas for admin panel. I've attached screenshot below for project structure.
enter image description here

In web.config of Areas->Views folder, I've mentioned:

    <host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    <pages pageBaseType="System.Web.Mvc.WebViewPage">
        <add namespace="System.Web.Mvc" />
        <add namespace="System.Web.Mvc.Ajax" />
        <add namespace="System.Web.Mvc.Html" />
        <add namespace="System.Web.Routing" />
        <add namespace="System.Web.Optimization" />
        <add namespace="CallApp" />

In Web.Config of root folder, I've mentioned:

<add key="webpages:Version" value="" />
<add key="webpages:Enabled" value="false" />
<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />

But I am getting The name 'Url' does not exist in the current context error in _Layout.cshtml page of Areas Admin.
enter image description here

Aucun commentaire:

Enregistrer un commentaire