Razor 剑道,剃刀支架问题

Razor 剑道,剃刀支架问题,razor,kendo-ui,Razor,Kendo Ui,我检查了大括号,小括号100次…我想他们的位置是正确的,但我得到了答案 逐字说明符@后应为关键字、标识符或字符串 @(Html.Kendo().TabStrip()) .名称(“客户”) .已选择索引(0) .项目(项目=> { items.Add().Text(“联系人”).Content(obj=> @(Html.Kendo().Grid()) .名称(“客户联系人”) .列(列=> { columns.Bound(l=>l.CustomerContactID); columns.Boun

我检查了大括号,小括号100次…我想他们的位置是正确的,但我得到了答案

逐字说明符@后应为关键字、标识符或字符串


@(Html.Kendo().TabStrip())
.名称(“客户”)
.已选择索引(0)
.项目(项目=>
{
items.Add().Text(“联系人”).Content(obj=>
@(Html.Kendo().Grid())
.名称(“客户联系人”)
.列(列=>
{
columns.Bound(l=>l.CustomerContactID);
columns.Bound(l=>l.CustomerID);
columns.Bound(l=>l.CustomerContactName);
columns.Bound(l=>l.CustomerContactPhone);
columns.Bound(l=>l.CustomerContactDuty);
})
.DataSource(DataSource=>DataSource
.Ajax()
模型
(型号=>{
model.Id(l=>l.CustomerContactID);
model.Field(l=>l.CustomerContactID).可编辑(false);
model.Field(l=>l.CustomerID);
字段(l=>l.CustomerContactName);
model.Field(l=>l.CustomerContactPhone);
model.Field(l=>l.CustomerContactDuty);
}
)
.Read(Read=>Read.Action(“CustomersContactsRead”、“Customers”、new{customerID=“#=customerID#“}))
.Update(Update=>Update.Action(“CustomersContactsEdit”、“Customers”))
.Create(update=>update.Action(“CustomerContactsCreate”,“Customers”,new{customerID=“#=customerID#“}))
)
.Events(e=>e.Edit(“onEdit”))
.Pageable()
.Sortable()
.Editable(editing=>editing.Mode(GridEditMode.InCell))
.ToolBar(ToolBar=>
{
toolbar.Create();
toolbar.Save();
})
.ToClientTemplate())
);}))

有大括号代码检查器吗?你能发现错误吗


先走一步

问题在于这条线

Content(obj => @(Html.Kendo().Grid<ModelApp.Models.CustomerContacts>()
Content(obj=>@(Html.Kendo().Grid())
在剃须刀中,您应该使用:

内容(@
@(Html.Kendo().Grid())

这是一个巨大的代码块。通常,我使用@(显示变量)和@{执行大型代码块}您使用什么视图引擎,是ASPX吗?.cshtml-VS2010,实体框架,C#和KendoUi
Content(obj => @(Html.Kendo().Grid<ModelApp.Models.CustomerContacts>()
Content(@<text>
    @(Html.Kendo().Grid<ModelApp.Models.CustomerContacts>()