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

后端 未结 30 3003
一个人的身影
一个人的身影 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:38

    You should be able to name the buttons and give them a value; then map this name as an argument to the action. Alternatively, use 2 separate action-links or 2 forms.

提交回复
热议问题