1
我目前有一個產品視圖頁面,其中包含一個MVCContrib HTML網格,並在每行的開頭都有一個選擇鏈接。如果選擇鏈接被點擊,它會帶我到另一個頁面。如何從MVCContrib HTML網格中檢索行ID?
我的問題是是否可以從所選的行中檢索productID並將其傳遞到下一頁。
也許這是可行的與會話變量,但我不知道。
任何幫助將不勝感激。
在此先感謝。
這裏是我的視圖代碼:
<% Html.Grid((List<System2__MVC2.Controllers.ProductController.ProductsSet>)ViewData["Products"]).Columns(column =>
{
column.For(c => Html.ActionLink("Select", "Products", "Product")).DoNotEncode();
column.For(c => c.ProductID);
column.For(c => c.Name);
column.For(c => c.Description);
column.For(c => c.Price);
}).Render();
%>
啊......非常感謝你,我新的ASP MVC,並沒有意識到你可以做到這一點。 再次感謝。 – RyanDreggs 2010-03-23 21:10:17