Link to home
Start Free TrialLog in
Avatar of David Gerler
David GerlerFlag for United States of America

asked on

Building a new website in MVC. Need to incorproate older ASP.Net pages

Hello,
   We are building a enterprise data site in MVC. We have an old site that has many older ASP.Net 2.0 pages that need to be incorporated into the site somehow to speed the process. Can anyone direct me to tutorials or information on how best to incorporate them or at least convert them easily.

Perhaps a bit more detail about what I want to do. We have a Menu framework built in MVC with several of our easier to recreate pages added. However, we have several rather complex pages that would be better  tied in rather than recreated. For example, labor.aspx calculates for a period including overtime, hours per job code, wages per job code etc. I am looking for any quick way to incorporate these pages as a menu item but make them require a login to access.
Avatar of Miguel Oz
Miguel Oz
Flag of Australia image

There are two recommended approaches, see more info in this link:
1. Create an empty ASP.NET MVC project first and then bringing in all ASPX pages of the existing Web Forms project.
https://stackoverflow.com/a/23405238/183784
2. Open an existing Web Forms project and then just choose to add a controller class. (check What about deployment?  section)
https://www.red-gate.com/simple-talk/dotnet/asp-net/mixing-web-forms-and-asp-net-mvc/

It all depends how you are going to move forward in your project, if are going to get rid of your web pages later on the approach 1 is recommended because you will have a proper MVC project at the end and you can remove any legacy web form dependencies. It could be hard to upgrade later on if you option 2.
As long as your stakeholders understand this is just a transition project, and you have to do later project to update your web form pages, you should be OK.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.