How to integrate asp.net mvc to Web Site Project

后端 未结 3 1518
甜味超标
甜味超标 2020-12-17 19:45

As I mentioned in title, I have a huge WEB SİTE PROJECT, and I want to add MVCinto it.

I have followed some tutorials about it but all of them are about integrating

3条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-17 20:34

    Converting the whole Web Site to a Web App (WAP) is likely to be painful, so I don't suggest it. You can try the other suggestion from @Grievoushead of making MVC work in a Web Site project (which can work), but I'll suggest an alternate one.

    Instead of trying to 'merge' the Web Site and MVC WAP, try keeping them mostly separate, but sharing the same folder. You could do something like this:

    • Start by creating an MVC project in a separate folder
    • Copy all the files from it into your WebSite. You may need to hand merge a coupe files like web.config and global.asax.
    • Then it you want to work on your MVC code, you open the csproj in VS. But if you want to work on your original code, just open the folder as a Web Site.

    A bit unusual, but depending on the exact situation, this may be a good approach.

提交回复
热议问题