有一个 mvc 应用程序,我试图在预编译的 CSHTML 页面(Index.cshtml)中进行修改
@using System.Web.Mvc.Html
@model Services.Admin.ViewModels.IndexViewModel
@{
Layout = "~/Views/Admin/_Layout.cshtml";
ViewBag.Title = Resources.AdminResources.Index_Title;
}
<div class="container">
<div class="masonry">
<div class="item col-lg-4 col-md-4 col-sm-4">
<h3>Event Clinics</h3>
<table class="table table-striped table-bordered table-hover">
<tbody>
<tr>
<td class="max-width">
@Html.ActionLink("Premier Instructors", "Index", "PremierInstructor")
</td>
<td></td>
</tr>
<tr>
<td class="max-width">
@Html.ActionLink("Reports", "Index", "Reports")
</td>
<td></td>
</tr>
<tr>
<td class="max-width">
@Html.ActionLink("Users", "Index", "Users")
</td>
<td></td>
</tr>
</tbody>
</table>
</div>
</div>
这里还有各自的 Index.generated.cs,其中所有代码都是在“WriteLiteral”的帮助下编写的。
当我尝试以 .cshtml 形式添加/修改时,它的影响未显示在 UI 上。
我还在各种网站上找到了这些 cshtml 已经使用“RazorGenerator”工具编译的信息。
现在我的问题是,当我要对这种类型的 cshtml 文件进行任何更改时,它不会反映在屏幕上。