Can you overload controller methods in ASP.NET MVC?

前端 未结 17 1863
无人共我
无人共我 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:39

    I like this answer posted in another thread

    This is mainly used if you inherit from another controller and want to override an acction from the base controller

    ASP.NET MVC - Overriding an action with differing parameters

提交回复
热议问题