DefaultControllerFactory的SimpleControllerFactory
public class SimpleControllerFactory : DefaultControllerFactory
{
protected override IController CreateController(RequestContext
requestContext
{
Controller controller = (Controller)base
(requestContext
controller
//修改默認的視圖引擎為我們剛才創建的視圖引擎
return controller;
}
}
這裡只要修改controller
我們自定義的ViewEngine就可以了
要使我們創建的控制器工廠類SimpleControllerFactory 成為默認的控制器工廠類
到這裡
在ASP
[
From:http://tw.wingwit.com/Article/program/net/201311/15014.html