Does (or will) a tool exist to convert WebForm view engine markup (aspx) to Razor view engine markup (cshtml)?
Razor Engine is an advanced view engine that was introduced with MVC3. This is not a new language but it is a new markup syntax. Web Form Engine is the default view engine for the Asp.net MVC that is included with Asp.net MVC from the beginning. The namespace for Razor Engine is System.
Razor will be one of the view engine options we ship built-into ASP.NET MVC. All view helper methods and programming model features will be available with both Razor and the . ASPX view engine. You'll also be able to mix and match view templates written using multiple view-engines within a single application or site.
Aspx Engine is faster compared to Razor Engine.
The Razor View Engine is a bit slower than the ASPX View Engine. Razor provides a new view engine with streamlined code for focused templating. Razor's syntax is very compact and improves readability of the markup and code. By default MVC supports ASPX (web forms) and Razor View Engine.
We too faced the problem of converting plenty of WebForms views to Razor. And guess what, we've also came up with a tool:
https://github.com/telerik/razor-converter
It also relies on regexes (and quite a few of them) to make sense of the WebForms mumbo-jumbo, much like the tool by JohnnyO. Ours might cover a few more cases, but don't take my word for it and try it on a few views instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With