phyregold
phyregold
CC#
Created by phyregold on 11/23/2024 in #help
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);
}
1 replies