相关疑难解决方法(0)

Change component view location in Asp.Net 5

On ASP.NET 5 a Component view must be in one of two places:

Views/NameOfControllerUsingComponent/Components/ComponentName/Default.cshtml
Views/Shared/Components/ComponentName/Default.cshtml
Run Code Online (Sandbox Code Playgroud)

Is there a way to change this to:

Views/NameOfControllerUsingComponent/Components/ComponentName.cshtml
Views/Shared/Components/ComponentName.cshtml
Run Code Online (Sandbox Code Playgroud)

So basically, remove the folder ComponentName and change the view name from Default.cshtml to ComponentName.cshtml.

For me it makes more sense ... Is it possible?

asp.net-core-mvc asp.net-core

3
推荐指数
1
解决办法
2955
查看次数

标签 统计

asp.net-core ×1

asp.net-core-mvc ×1