Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tool to convert WebForm view engine markup to Razor view engine markup

Tags:

asp.net-mvc

Does (or will) a tool exist to convert WebForm view engine markup (aspx) to Razor view engine markup (cshtml)?

like image 954
Christopher Edwards Avatar asked Oct 16 '10 21:10

Christopher Edwards


People also ask

What is difference between Razor and webform engine?

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.

Is Razor a view engine?

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.

Which is faster between ASPX view engine and Razor View Engine?

Aspx Engine is faster compared to Razor Engine.

Which is more faster between ASPX view engine and Razor View Engine 2 marks?

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.


1 Answers

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.

like image 95
Tsvetomir Tsonev Avatar answered Sep 20 '22 20:09

Tsvetomir Tsonev