0
我目前使用的ActionLink的在列格:劍道UI網格:在圓柱狀後用MVC 4
columns.Bound(p => p.ID)
.Template(@<text>
@Html.ActionLink("Edit", "Index",
"ManageUser", new { id= @item.ID}, null)
</text>);
在我們的應用程序將上述行動已經改變,現在可以只收到帖子。如何在列中單擊鏈接時將以上代碼更改爲id到ManageUser控制器?
我試圖把一種形式,像這樣的列,但它並沒有渲染表單標籤:
columns.Bound(p => p.ID)
.Template(@<text>
@Html.BeginForm("Index", "ManageUser", new {id= @item.ID})
{
<a "javascript to post">@item.ID</a>
}
</text>);
只需將「.Render()」添加到Kendo網格中,引發錯誤:SearchUserResultGrid.cshtml(6):error CS1502:System.Web.WebPages.WebPageExecutingBase.Write(System。 Web.WebPages.HelperResult)'有一些無效的參數。 – 2013-03-28 16:08:57
確保您的括號已經將括號更改爲{},如我的示例中所示。 – 2013-03-28 20:33:45
更接近。它現在生成一個字符串輸出,它看起來像只寫對象名稱:System.Web.Mvc.Html.MvcForm {my link here}而不是表單。 – 2013-03-28 20:43:11