在ASP.NET Razor MVC渲染器中,`%%`(两个百分比)字符是什么意思?

在ASP.NET Razor MVC渲染器中,`%%`(两个百分比)字符是什么意思?,asp.net,asp.net-mvc,asp.net-mvc-3,razor,renderer,Asp.net,Asp.net Mvc,Asp.net Mvc 3,Razor,Renderer,这些%%(两个百分比字符)在ASP.NET Razor MVC渲染器中意味着什么 @{ ViewBag.Title = %%Index%%; } 创建新视图时,使用“添加>视图”菜单。 使用以下配置: 我得到了休闲代码: @model IEnumerable<CadeMeuMedico.Models.Medico> @{ ViewBag.Title = %%Index%%; } <h2>Index</h2> <p> @Html.Acti

这些
%%
(两个百分比字符)在ASP.NET Razor MVC渲染器中意味着什么

@{
    ViewBag.Title = %%Index%%;
}
创建新视图时,使用“添加>视图”菜单。 使用以下配置:

我得到了休闲代码:

@model IEnumerable<CadeMeuMedico.Models.Medico>
@{
ViewBag.Title = %%Index%%;
}
<h2>Index</h2>
<p>
@Html.ActionLink("Create New", "Create")
</p>
<table>
<tr>
<th>
@Html.DisplayNameFor(model => model.IDMedico)
</th>
<th>
@Html.DisplayNameFor(model => model.CRM)
</th>
<th>
@Html.DisplayNameFor(model => model.Name)
</th>
<th>
@Html.DisplayNameFor(model => model.Email)
</th>
<th>
</th>
</tr>

@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.IDMedico)
</td>
<td>
@Html.DisplayFor(modelItem => item.CRM)
</td>
<td>
@Html.DisplayFor(modelItem => item.Name)
</td>
<td>
@Html.DisplayFor(modelItem => item.Email)
</td>

<td>
@Html.ActionLink("Edit", "Edit",
new { /* id=item.PrimaryKey */ }) |
@Html.ActionLink("Details", "Details",
new { /* id=item.PrimaryKey */ }) |
@Html.ActionLink("Delete", "Delete",
new { /* id=item.PrimaryKey */ })
</td>
</tr>
}
</table>
@model IEnumerable
@{
ViewBag.Title=%%索引%%;
}
指数

@ActionLink(“新建”、“创建”)

@DisplayNameFor(model=>model.IDMedico) @DisplayNameFor(model=>model.CRM) @DisplayNameFor(model=>model.Name) @DisplayNameFor(model=>model.Email) @foreach(模型中的var项目){ @DisplayFor(modelItem=>item.IDMedico) @DisplayFor(modelItem=>item.CRM) @DisplayFor(modelItem=>item.Name) @DisplayFor(modelItem=>item.Email) @ActionLink(“编辑”、“编辑”, 新的{/*id=item.PrimaryKey*/})| @ActionLink(“详细信息”、“详细信息”, 新的{/*id=item.PrimaryKey*/})| @ActionLink(“删除”、“删除”, 新的{/*id=item.PrimaryKey*/}) }
Nothing.%%在《剃刀》中没有任何意义。不管是什么,这和剃须刀无关。它看起来像某种预处理器令牌。我编辑了这个问题并添加了这个代码appears@bwyn,这不是语法错误,它是由MVC3 Razor new view wizardNothing生成的。%%在《剃刀》中没有任何意义。不管是什么,这和剃须刀无关。它看起来像某种预处理器令牌。我编辑了这个问题并添加了这个代码appears@bwyn,这不是语法错误,它是由MVC3 Razor新视图向导生成的