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

Viewed 10822

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

3 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.

Users of ReSharper may like to vote for a feature to automatically convert from aspx to cshtml. ReSharper will have an AST representation for both sides, so they could (in theory) do a very robust job of it without requiring regexs.

http://youtrack.jetbrains.net/issue/RSRP-194060

Related