阅读背景:

在Controller操作方法中重用代码的最佳方法

来源:互联网 

I have certain code with in the same controller class that looks almost the same, such as setting viewbags to populate all the drop down lists, the same code applies in my Post and get Create and Edit action methods. So I have created a private method at the end of my controller class as follow:-I have certain code with in the same controller




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: