This answer is expected to undergo a number of changes in the coming days, in line with the subsequent doubts of the questioner on specific aspects of its application. It may be that other questions can be opened or used to explain some more complex aspect. I will be reading the comments every day. Please mention me in the comments so I can improve the response by directing to your question.
I will go over some aspects in the answer. If necessary, I will add more over the days. The idea is to use these ideas as a roadmap for your migration.
1. When converting your project, you don’t need to use your Views in Razor
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 generation of Views through legacy pages. This can be easily seen when creating a new ASP.NET MVC4 project:
2. MVC views do not have Code Behind, nor must they possess
This step is inevitable: it will be necessary to transfer any and all logic from your Code Behind for two possible places:
- Controller
- Eventos Javascript
3. Postback does not exist in MVC
Basically a Postback is a 3 part abstraction:
- Some Javascript logic;
- Some HTML code;
- Some server-side behavior (Server-Side).
By the time AJAX Toolkit was designed, all this logic was too much to be done. Today we have a myriad of Javascript libraries that simplify work and allow the programmer to extend Javascript behavior beyond the possible in AJAX Toolkit, which has made it long and complex to maintain.
The classic Postback replacement can be done using, for example:
- Jquery;
- Razor or ASPX;
- Events in Controller that return:
4. Your controllers must call the proprietary Dlls
Refer to your Dlls normally within the MVC project, as is done in the Classic ASP.NET project. Calls to each class and method are made in the same way.
Favorite. I’ll write you a guide.
– Leonel Sanches da Silva
Your answer very much interests me @Gypsy
– gmsantos