Hi,
I have a partial view with another partial view. When i try to post the data from the partial view to Action method nothing happens.Even when i put a break point in the action method nothing happens .. it doesn't hit the break point. is there anything i'm doing wrong below? or could someone please direct me on how to do this?
This is the main partial view that contains another partial view
<div>
<h2 class="heading">Thanks</h2>
<div>
<span>
<span>
Thank you for us
</span>
</span>
</div>
</div>
<div>
@Html.Partial("_details")
</div>
</div>
This is the main partial view that contains another partial view:
using (Html.BeginForm("Details", "MyController", FormMethod.Post))
{
@model DetailsModel
@Html.CheckBoxFor(m => m.Email)
@Html.LabelFor(m => m.Email, "I want to receive any promotions or offers via email")
@Html.CheckBoxFor(m => m.Tel)
@Html.LabelFor(m => m.Tel, "I want to receive any promotions or offers via sms")
<input type="submit" value="Save" />
}
Then I have code behind like this:
public ActionResult Details()
{
return View()
}
[HttpPost]
public ActionResult Details(DetailsModel model)
{
return View()
}
What I have tried:
I have been researching for the past two hours.. debugging the project but still nothing . It doensnt even hit the break point.