-2
如何在同一页上创建和显示?可能吗? 如何使用@model IEnumerable的<>,并在同一页面@model <>(列表/创建)如何在同一页上创建并显示mvc 5
@*[email protected] IEnumerable<Mvc_baker.Areas.admin.Models.pollquestion>*@
@model Mvc_baker.Areas.admin.Models.pollquestion
@{
ViewBag.Title = "";
<link href="@Url.Content("~/Content/webgrid.css")" rel="stylesheet" type="text/css" media="all" />
Layout = "~/Areas/admin/Views/Shared/_AdminLayout.cshtml";
var grid = new WebGrid(
source: Model,
defaultSort: "OptionID",
rowsPerPage: 50,
canPage: true,
canSort: true,
selectionFieldName: "SelectedRow"
);
int rowVal = 0;
}
你想创建什么?请更具体一点? – 2015-02-11 23:37:23
这到底是什么?是什么让你觉得这是一个合适的问题?您在发布之前是否阅读过自己的问题?难以置信。 – jzm 2015-02-12 01:34:41
我想从在数据库中插入数据然后显示网格时创建,但在同一页上 – saeed3164 2015-02-12 12:04:18