How to mix WebForms and MVC in ASP.NET

I have an existing ASP.NET WebForms 3.0 application that works just fine. I upgraded it to ASP.NET 4 and it still works great, but now I want to add some ASP.NET MVC pages to it. I don't want to rewrite the application.

Any suggestions? Can I mix them? How to work it? Any tutorials for me?

Answers


Take a look at Scott Hanselman's blog article on this very topic:

Integrating ASP.NET MVC 3 into existing upgraded ASP.NET 4 Web Forms applications


You have to mention this line of code in the Global.asax file in the MVC application.

routes.IgnoreRoute("{WebPage}.aspx/{*pathInfo}");

This disables the MVC routing for the files of extension .aspx


Need Your Help

Difference between "module.exports" and "exports" in the CommonJs Module System

javascript node.js commonjs

On this page (http://docs.nodejitsu.com/articles/getting-started/what-is-require), it states that "If you want to set the exports object to a function or a new object, you have to use the module.ex...

What do I do with ClojureScript One?

clojure clojurescript

This is a wonderful project, but where to start?