This response should undergo a number of changes over the next few days, depending on the questioner's subsequent doubts about specific aspects of his application. It may be that other issues can be opened up or used to make something more complex. I'll be reading the comments every day. Please let me know in the comments so that I can improve the answer by directing you to your question.
I'll go into some detail in the answer. If necessary, I will add more in the course of days. The idea is to use these ideas as a roadmap for your migration.
1. When converting your project, you do not need to use your Razor Views
First of all, it is important to say that migrating an ASP.NET application to ASP.NET MVC does not necessarily mean that the Razor engine will be used to generate the Views . MVC supports Views generation through legacy pages. This can easily be seen when creating a new ASP.NET MVC4 project:
2. Views in MVC do not have Code Behind , nor should they have
This step is inevitable: you will need to transfer any logic from your Code Behind to two possible places:
- Controller
- JavaScript Events
3. Postback does not exist in MVC
Basically a Postback is an abstraction of 3 parts:
- Some JavaScript logic;
- Some HTML code;
- Some server-side behavior.
At the time the AJAX Toolkit was designed, all of this logic was too laborious to do. Nowadays we have a myriad of JavaScript libraries that simplify the work and allow the programmer to extend JavaScript behavior beyond the AJAX Toolkit, which has made it long-winded and complex to maintain.
Classic postback substitution can be done using, for example:
- JQuery;
- Razor or ASPX;
- Controller events that return:
4. Your Controllers should call the proprietary DLLs
Refer to your DLLs normally within the MVC project, just like in the Classic ASP.NET project. Calls to each class and method are made in the same way.