Search code examples
asp.netasp-classiclanguage-features

Moving from Classic ASP to ASP.net


I've come from a Classic ASP background, done it for years and years and moving to .net has been way overdue, so I've started to learn .net.

It's very different to say the least! It's structured a lot differently, and seems to work a lot differently, it's a huge leap upwards. However, it is appearing to me to be more and more awesome.

I've had a quick search and can't find any similar questions, so I've created this one as a community wiki, if you could list the pitfalls/differences or whatever you think it relevant in your responses it might be helpful to a lot of people.

So in summary, what are the main differences/gotchas moving from Classic ASP to ASP.net? (c# or VB.net). Please don't just list language features of .net, it needs to be in the context of someone moving from one to the other.


Solution

  • I'm assuming that you are moving to WebForms (but you might consider to jump straight to MVC or Silverlight as WebForms is on its way out)

    FWIW when I made the move the following were probably the main gotchas:

    • Resist the temptation to use classic conventions <%=, #include
    • Resist the temptation to edit the ASPX file by hand - try to just use the designer
    • You will need to get up to speed with OO if you haven't done so already
    • For WebForms, you will need to take a VB6 / WinForms approach to button handlers etc
    • Use the ASP.NET controls - you won't need to fuss about micromanaging the state of controls as you did in ASP Classic

    Take in some videos: http://www.asp.net/general/videos#Videos%20on%20Migrating%20to%20ASP.NET