开发者

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

开发者 https://www.devze.com 2022-12-28 22:31 出处:网络
How can I create 开发者_如何学编程generic class from System.Web.Mvc.ViewPageViewPage is already defined in a generic form, so you can do:

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

精彩评论

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