If you have a budget to rewrite these server-side controls using the MVC paradigm, which would be the best way. If not, you can put them in existing classic WebForms pages and which will interact with the new MVC application using standard HTTP / HTML methods: compose messages, send identifiers via query string parameters, iframes, cookie, HTML 5 storage, etc. One thing is certain: try to avoid placing these server-side controls in your MVC views. As a result, you get some kind of hybrid application that is not proper ASP.NET MVC and will not be correct WebForms, which would be a disaster.
Personally, I had to perform the same migration several times, and I did not mix classic WebForms with MVC in one application using scopes or some other methods. In the end, it can turn into a nightmare, trying to make these two creatures together. It is always one of two things: I have a budget, and I rewrite correctly from scratch or I don’t have a budget, and I am correctly doing new material using ASP.NET MVC and trying to interact with an existing application.
It’s easier for me to simply launch a separate MVC application, which, depending on the interaction I'm looking for, will use different methods to integrate functionality from an existing WebForms application.
I don’t really understand the complexity and details of your script, so it’s difficult to give an objective answer, but the ability to continue to write new code based on existing controls on the WebForms server side and not to do any MVC for this project at all can be a good solution. Writing a new application in ASP.NET MVC just for the sake of this may not always be the best choice.
source share