H20rider
H20rider

Reputation: 2282

MvcSiteMapProvider is using ascx

I have donwloaded the Nuget package, MvcSiteMapProvider.

In one project it only downloaded the razor views. In my other, I have both the Razor and ascx files. Also in that project it is default to using the ascx. I want it to use the razor pages instead. Does anyone know how to switch this.

Upvotes: 1

Views: 201

Answers (1)

NightOwl888
NightOwl888

Reputation: 56849

When the NuGet package detects no files with a .aspx extension in your project or detects any files with a .cshtml or a .vbhtml extension, it will install the .cshtml templates. Unfortunately, there is no reasonable default when both .aspx and .cshtml extensions are detected or no files with the above extensions are detected, so this is a "best guess".

To install the Razor templates, you just need to delete the .ascx templates and copy the .cshtml templates from here.

Upvotes: 2

Related Questions