How do you handle multiple submit buttons in ASP.NET MVC Framework?

后端 未结 30 3044
一个人的身影
一个人的身影 2020-11-21 07:16

Is there some easy way to handle multiple submit buttons from the same form? For example:

<% Html.BeginForm(\"MyAction\", \"MyController\", FormMethod.Pos         


        
30条回答
  •  灰色年华
    2020-11-21 07:47

    If your browser supports the attribute formaction for input buttons (IE 10+, not sure about other browsers) then the following should work:

    @using (Html.BeginForm()){
        //put form inputs here
    
    
    
    
    
    }
    

提交回复
热议问题