整合 jQuery ContextMenu 插件實現右鍵選單,搭配簡易分頁。
Scripts,頁面引用。id="myMenu1"、class="contextMenu"),項目含 detail/new/delete/modify 圖示。class="showContext"、id="ProductID"。<td class="showContext" id="<%= item.ProductID %>"><%: item.ProductName %></td>$('.showContext').contextMenu('myMenu1', { bindings: { detail: fn, delete: fn } });分頁:Controller 回傳 PagedList,View 用 Html.PagedListPager(或手寫頁碼連結)。
效果圖:
