Best way to convert from asp to aspx

14,312

ASP.NET is not an updated version of classic ASP but actually something rather different so unfortunately there is no magic bullet and you'll need to review each of your script files and rework each one.

For less up-front rework, you can use VB.NET as your ASP.NET language, and you can also use ASP.NET Forms (as opposed to MVC.) VB.NET gives you a syntactically similar language to VBScript (assuming you weren't using JScript.) Forms gives you a similar structure without having to separate your logic from your content. Very broadly speak an .aspx page is kind of like your .asp page, except you can have code in an extra code-behind page, (.cs.)

However, you should inform your client that if you do that, it will likely be a huge problem from a maintenance perspective later on. Although ther are plenty of VB.NET sites out there, C# is the most common and almost ubiquitous choice as a language for ASP.NET and .NET in general and as time goes by, it will be harder to find people willing to work with VB.NET. (Think how many JScript coders you know with classic ASP and you'll get the picture.) Further, not going with an ASP.NET MVC solution is also somewhat risky from a future-proofing perspective. Most languages are moving to MVC and similar models.

The bottom line is that you'd pretty much end up with a rewrite for a C# MVC solution, but it would be something maintainable down the line, whereas a VB.NET forms solution now would get you a faster conversion but you will likely even now have problems finding good developers who would want to work on it as many will prefer C# projects, given a choice.) A C# and MVC solution would also likely by design be cleaner and easier to maintain too.

Share:
14,312
abi
Author by

abi

iOS Mobile App developer. \m/

Updated on June 04, 2022

Comments

  • abi
    abi almost 2 years

    I have got a bunch of classic asp pages(around 400 pages).However my client doesn't want me to rewrite the application right from the scratch. I have tried with http://www.asp.net/downloads/archived-v1.1/migration-assistants/asp-to-aspnet/ but it didnt work as I am working on visual studio 2012. Is there any other way/tool for conversion which is quite easier and faster? Thanks in advance

  • Neil Cresswell
    Neil Cresswell over 10 years
    Just wanted to add that I wrote my answer based on the fact that you wish to convert rather than have classic ASP co-exist with .NET, which would likely be the fastest solution. (Somewhat painful but possible. Have worked on mixed projects before.) However, there is always the risk that at some point down the line classic ASP won't be supported on IIS so something else to keep in mind.
  • Shadow The Kid Wizard
    Shadow The Kid Wizard over 10 years
    Actually moving from classic ASP to MVC is harder and requires to learn much more things than moving just to plain ASP.NET
  • DeepakKhetwal
    DeepakKhetwal over 10 years
    But let me tell you if you can learn Mvc go with it that's where most of the world is going for due to its clear separation of layer going with web form may not be the good idea
  • Shadow The Kid Wizard
    Shadow The Kid Wizard over 10 years
    I didn't say ASP.NET MVC is not good, on the contrary - it's excellent and I use it too, but it's not "best way to convert classic asp to asp.net" but rather something that should be done after one already knows his share of ASP.NET
  • DeepakKhetwal
    DeepakKhetwal over 10 years
    Whatever you do for migration I would not recommend web forms as you would not like migration again in near future