C
C#5w ago
phyregold

Posting a list to a partial view in MVC

I have a really simple view that I am trying to pass a list to, when I check the list on the Controller side, the object is null
@model IARETradeBLL.Model.PhyreResearchPageModel
@{
ViewBag.Title = "NewResearch";
Layout = "~/Views/Shared/_Layout.cshtml";
}

<p>@Model.PhyreResearchStock.Ticker</p>
@Html.Action("_OptionResearch", "Research", Model.PhyreOptionInformations);
<h2>NewResearch</h2>
@model IARETradeBLL.Model.PhyreResearchPageModel
@{
ViewBag.Title = "NewResearch";
Layout = "~/Views/Shared/_Layout.cshtml";
}

<p>@Model.PhyreResearchStock.Ticker</p>
@Html.Action("_OptionResearch", "Research", Model.PhyreOptionInformations);
<h2>NewResearch</h2>
public PartialViewResult _OptionResearch(List<IARETradeBLL.Model.PhyreResearchOptionInformation> phyreResearchOptionInformation)
{
return PartialView(phyreResearchOptionInformation);
}
public PartialViewResult _OptionResearch(List<IARETradeBLL.Model.PhyreResearchOptionInformation> phyreResearchOptionInformation)
{
return PartialView(phyreResearchOptionInformation);
}
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server