C# .net MVC5 Partial views with Webgrid table.
I have a Webgrid table that has a select a row feature.
When row is selected, another Webgrid needs to appear on the same screen.
Instead the first Webgrid disappears, and the second Webgrid appears on the top.
View with Webgrid:
gridview1.Column(columnName: "", header: "", style: "f9a", format: (item) =>
Html.ActionLink("jobs by SLA", "JobsBySLA", new { DateID = item.Date }))
))
Controller
public ActionResult JobsBySLA()
{
string DateField = Request["DateID"];
List<Secure> _list1 = _s.get_SLA(Datefield);
View("~/Views/Secure/Index.cshtml", _list1);
return PartialView("~/Views/Shared/Partial1.cshtml", _list);
}
[ChildActionOnly]
public ActionResult Partial1()
{ …
return PartialView("~/Views/Shared/Partial1.cshtml", _list);
I have tried
@Html.RenderPartial("_SecurePartial1")
@Html.RenderAction("SecurePartial1").
@Html.Action("SecurePartial1", "Secure")
I have a Webgrid table that has a select a row feature.
When row is selected, another Webgrid needs to appear on the same screen.
Instead the first Webgrid disappears, and the second Webgrid appears on the top.
View with Webgrid:
gridview1.Column(columnName: "", header: "", style: "f9a", format: (item) =>
Html.ActionLink("jobs by SLA", "JobsBySLA", new { DateID = item.Date }))
))
Controller
public ActionResult JobsBySLA()
{
string DateField = Request["DateID"];
List<Secure> _list1 = _s.get_SLA(Datefield);
View("~/Views/Secure/Index.cshtml", _list1);
return PartialView("~/Views/Shared/Partial1.cshtml", _list);
}
[ChildActionOnly]
public ActionResult Partial1()
{ …
return PartialView("~/Views/Shared/Partial1.cshtml", _list);
I have tried
@Html.RenderPartial("_SecurePartial1")
@Html.RenderAction("SecurePartial1").
@Html.Action("SecurePartial1", "Secure")