Search Results

Search found 1 results on 1 pages for 'cocoach'.

Page 1/1 | 1 

  • Why is my form triggering the wrong controller action?

    - by COCoach
    This form has multiple submit buttons, when clicked, it calls a simple JavaScript function to change the value of a hidden input (function is called "setHidden". This worked before, after some other not relevant code, it has ceased working. Essentially, the action it is supposed to call is never called, instead it seems to default back to a previous URL. The Form: <form action="/League/RemoveOwner" method="post"> <input type="hidden" value="1007" name="lid"/> <input type="hidden" value="0" id="index" name="index"/> <input type="image" src="../../Resources/Images/Delete.png" height="12" alt="Remove Owner" title="Remove Owner" onclick="setHidden('index', '1031')"/></a> coach<br /> </form> The Controller: [HttpPost] public ActionResult RemoveOwner(int id, string index) { //yada return PartialView(); } When clicking the image, it should call the remove owner controller, instead it calls the "View" controller: public ActionResult View(int id) { //yada return View(); }

    Read the article

1