asp.net mvc - Calling actionresult from view -


this actionresult()

    public actionresult pay()     {         return view();      }      [httppost]     public actionresult mytry()     {         return view();     } 

and view pay.chtml

@using (html.beginform("mytry", "home")) {  <table> <tr>     <td align="center">           <input type="button" value="submit" />     </td>   </tr>  </table> } 

i not able call mytry() action result here. how it?

in order submit form, must use <input type="submit" /> or <button type="submit"> try following:

@using (html.beginform("mytry", "home", formmethod.post)) {    <table>     <tr>       <td align="center">         <input id="btnsubmit" type="submit" value="submit" />       </td>     </tr>   </table> } 

Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -