Can we call the Method of a controller from another controller in asp.net MVC?

来源:互联网 发布:paxos算法 活锁 编辑:程序博客网 时间:2024/06/05 10:00

http://stackoverflow.com/questions/2910948/can-we-call-the-method-of-a-controller-from-another-controller-in-asp-net-mvc

public class ThisController {  public ActionResult Index() {    var other = new OtherController();    other.OtherMethod();    //OR    OtherController.OtherStaticMethod();  }}

0 0
原创粉丝点击