I want to use my own WebViewPage in MVC3 and When I create an abstract class with specific name and change the WebViewPage to my own type in Web.config, I get this error:
Compiler Error Message: CS0308: The non-generic type 'Aya.Moj.Web.Controllers.MojWebViewPage' cannot be used with type arguments
Custom WebViewPage code:
namespace Aya.Moj.Web.Controllers
{
public abstract class MojWebViewPage : WebViewPage
{
//just for test
public string Boo { set; get; }
}
}
You should inherit from
WebViewPage<TModel>because you’re going to pass a Model to thisWebViewPageThen your
WebViewPagewill look like this :