views:

66

answers:

1

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

+1  A: 

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.

Brian