ASP.Net MVC 4 Form with 2 submit buttons/actions

前端 未结 7 1562
故里飘歌
故里飘歌 2020-11-28 21:45

I have a form in ASP.Net and razor.

I need to have two ways of submitting said form: one that goes through the Edit action, and another that goes throug

7条回答
  •  青春惊慌失措
    2020-11-28 22:18

    You can do it with jquery, just put two methods to submit for to diffrent urls, for example with this form:

    <%-- form data inputs here ---%>

    you can use this script (make sure it is located in the View, in order to use the Url.Action attribute):

    
    

提交回复
热议问题