Hi All,
I'm using MVC3 with Razor.
In one of my views I have:
and in my controller I have:Code:<div style="width: 100em; float: left"> <button id="saveButton" name="submitButton" value="save" type="submit"> Save</button> @Html.ActionLink("Cancel", "Edit", "ComputerBreakDownSection", new { sectionID = Model.SectionID, policyZoneId = Model.PolicyZoneID, fred = 1}, new { id = "cancelLink" }) </div>
when I press my save button on the form I am expecting the controller to enter my HttpPost Edit ActionResult. However neither of the Edit actions in my controller are triggered on the press of the button. Am I missing something from the ActionLinkCode:public ActionResult Edit(int sectionID, int policyZoneId) { ComputerBreakDownSectionViewModel viewModel = _gridService.GetComputerBreakDownSectionViewModel(policyZoneId, sectionID); return View(viewModel); } [HttpPost] public ActionResult Edit(int sectionID, int policyZoneId, int fred) { ........


Reply With Quote
