开发者

How can I create generic class from System.Web.Mvc.ViewPage

How can I create 开发者_如何学编程generic class from System.Web.Mvc.ViewPage


ViewPage is already defined in a generic form, so you can do:

public class MyViwePage : System.Web.Mvc.ViewPage

You can specify this as the base page class for your views in the inherits attribute; the web.config in the views folder has a basePageType (or similarly named attribute) where you can define this base class type too.

What features are you looking to provide? It may be easier to use extension methods to add functionality.

HTH.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜