views:

36

answers:

1

I am developing a website which will be having both asp.net pages and MVC pages in it, So I have BaseWebPage class which will be used for both asp.net pages and MVC Views. but My BaseWebPage class is inherited from System.Web.Mvc.ViewPage, So Will there be any code/ functionality break for normal asp.net pages, because System.Web.Mvc.ViewPage is overriding some of the Pagelife cycle methods.

+1  A: 

There could be. What you're proposing to do will probably work in MVC 2, but it's unsupported and may break in MVC 3 or any other future version.

What you may want to do instead is factor the common logic into a property or other item that is accessible both from your WebForms pages and your MVC views but which is distinct from the pages / views themselves. That way, changes in the pipeline are less likely to affect these parts of your application.

Levi