【发布时间】:2011-08-22 02:05:11
【问题描述】:
我有些东西找不到正确的语法:
/Views/Shared/EditorTemplates/Component.cshtml
@model Website.Models.Component
<div class="editor-field">
@if (x => x.Name == "")
{
@Html.EditorFor(x => x.Name)
<button class="create">New</button>
}
else
{
@Html.DisplayFor(x => x.Name)
<button class="delete" value="@Model.Id">X</button>
}
</div>
我希望意图很明确......我如何到达那里(这种事情很难用谷歌搜索)?
【问题讨论】:
标签: asp.net-mvc-3 lambda razor editortemplates