Can you overload controller methods in ASP.NET MVC?

前端 未结 17 2017
无人共我
无人共我 2020-11-22 08:10

I\'m curious to see if you can overload controller methods in ASP.NET MVC. Whenever I try, I get the error below. The two methods accept different arguments. Is this some

17条回答
  •  半阙折子戏
    2020-11-22 08:34

    If this is an attempt to use one GET action for several views that POST to several actions with different models, then try add a GET action for each POST action that redirects to the first GET to prevent 404 on refresh.

    Long shot but common scenario.

提交回复
热议问题