I saw this problem a lot here, but my problem is a little different. I already have two Create actions that were created by MVC out of the box, listed as such (one GET, one POST):
public ActionResult Create()
{
}
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult Create([Bind(Include="WeeklyTargetId,UserId,WeekId,Hours")] WeeklyTarget weeklytarget)
{
}
My problem is that I am trying to update the Create View based on DropDown, which was added to the page enclosed inside its own form, where when presented, the user can filter another drop-down menu in the main Create form. Here is my separate wrapped form in the Create view:
@using (Html.BeginForm())
{
<p>
<span>
Filter By Practice:
@Html.DropDownList("Practice", (List<SelectListItem>) ViewBag.PracticeList, new { @onchange = "this.form.submit();"})
</span>
</p>
}
, , , onchange Create, :
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Create(FormCollection formCollection)
{
}
, , MVC , , Create. ? ? , Create? , Create View, . , !