大家好,我有一个名为网格的视图页面和名为历史的部分视图,我想在我的网格页面中显示部分视图,我的页面中有视图,但历史页面中没有填充数据
this is my GridsPage
<%
var grid = new WebGrid(source: Model, defaultSort: "ResourceName", rowsPerPage: 3);
using (Html.BeginForm())
{ %>
<%: Html.DropDownList("ResourceName", (SelectList)ViewBag.ResourceName, "--Select Project--")%>
<%: Html.ValidationMessage("ResourceName")%>
<%: Html.DropDownList("ResourceID", (SelectList)ViewBag.ResourceID, "--Select Project--")%>
<%: Html.ValidationMessage("ResourceID")%>
<%: Html.DropDownList("status", (SelectList)ViewBag.status, "--Select Project--")%>
<form action="Grids.aspx" method="post">
<p>
<input type="submit" value="search" />
</p>
</form>
<div id="grid">
<%:grid.GetHtml(
tableStyle: "listing-border", headerStyle: "gridhead", footerStyle: "paging", rowStyle: "td-dark", alternatingRowStyle: "td-light",
columns:grid.Columns(
grid.Column("ResourceID","Resource ID"),
grid.Column("ResourceName","Resource Name"),
grid.Column("EmployeEmailID","Employee ID"),
grid.Column("status","Status"),
grid.Column(
header: "",
style: "text-align-center",
format: (item) => Html.ActionLink("Edit", "Edit", new { ResourceID = item.ResourceID }))
))%>
</div>
<%} %>
//Rendering the Partial view here
<%:Html.Partial("History") %>
这是我的部分观点
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<Gridview_BugTracker.Models.BugTracker_DataHelper>>" %>
<% foreach (var item in Model)
{ %>
<div>
<%:Html.LabelForModel(item.EmployeName)%>
</div>
<div>
<%:Html.LabelForModel(item.Resolution)%>
</div>
这是我的部分视图控制器
[AcceptVerbs(HttpVerbs.Get)]
public ActionResult History()
{
var getbugs = GetBugs();
return View(getbugs);
}
它不会进入动作方法历史......任何人都可以纠正我我在哪里做错了吗?