ASP.Net MVC action 同时支持Get和Post
项目中遇到一个action,有post和get请求,特此记录方法:
在action 上加上 AcceptVerbs标签:
1 | [AcceptVerbs(HttpVerbs.Get | HttpVerbs.Post)] |
转自:https://blog.csdn.net/Helloantoherday/article/details/85007344
ASP.Net MVC action 同时支持Get和Post
https://yuanjianzhang.github.io/2019/04/10/ASP-Net-MVC-action-同时支持Get和Post/