3

I'm developing a web application for a company which I work for. My team started working on the app few months ago and the decision was to build it with ASP.NET WebForms. Now we've quite a lot of the code developed and we're wondering if ASP.NET WebForms was a good choice. Maybe we should migrate. Ok, but what's the first step? We don't want to rewrite everything from scratch. We'd like to add a new stuff in MVC and rewrite the old part in the future (gradually). Is it possible to add somehow ASP.NET MVC application to current WebForms one? Can they live together?

2 Answers 2

8

Asp.net webforms and MVC can live happily together. You will add some includes and directores and add a route which will cause your webforms pages to be ignored. All explained here:

http://www.packtpub.com/article/mixing-asp.net-webforms-and-asp.net-mvc

Sign up to request clarification or add additional context in comments.

1 Comment

Hey, come back and give me my link back! :P the interface says I answered before you did :P
6

Mixing MVC with webforms is not that all hard. Basically, you want to ignore any exisiting .aspx routes in your global.asax, and then add routes for new pages that you want to build using MVC.

See this article for more details.

3 Comments

As I can see.. Razzie answered first. :)
to be fair, I think Palantir was like 30 seconds before me, but I won't complain... :)
@Razzie.. yea u're right, I'll change accepted answer. :) Sorry for inconvenience.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.