samedi 13 juin 2015

Calling actionresult from view

This is my ActionResult()

    public ActionResult pay()
    {
        return View();

    }

    [HttpPost]
    public ActionResult mytry()
    {
        return View();
    }

and this is my view pay.chtml

@using (Html.BeginForm("mytry", "Home"))
{ 
<table>
<tr>
    <td align="center">


        <input type="button" value="submit" />
    </td>
  </tr>

</table>
}

I am not able to call the mytry() action result from here. How to do it?

Aucun commentaire:

Enregistrer un commentaire