Appendix A. Migrating from ASP to ASP.NET


  • ASP.NET Pages End with the Extension .aspx

  • Option Explicit Is On by Default

  • No More Variants

  • Use Parentheses When Passing Parameters to Subroutines and Methods

  • Functions and Subroutines Must Be Declared in <Script> Tags

  • Parameters Are Passed by Value

  • Forms Should Post Back to the Same Page

  • Only One Server-Side Form per Page

  • Don't Use Set and Let When Working with Objects

  • Apartment-Threaded Components Are Not Supported

  • No Nonindexed Default Properties

  • ASP.NET Pages Can Contain Only a Single Language

  • Differences in Request , Request.Form , and Request.QueryString

This appendix provides information on migrating from earlier versions of Active Server Pages to ASP.NET. If you are an existing Active Server Pages developer, one of the first questions that you'll likely ask is "How compatible is ASP.NET with previous versions of Active Server Pages?" In other words, you might be wondering whether you can simply upgrade your existing Active Server Pages Web site to ASP.NET without rewriting any code.

The answer to this question is complicated. In one trivial sense, ASP.NET is completely backward compatible with previous versions of Active Server Pages. As long as you name your pages with the extension .asp , they will be executed by exactly the same engine that was used to execute previous versions of Active Server Pages ( ASP.dll ). However, if you continue to execute pages with the extension .asp , you will gain none of the benefits of ASP.NET. For example, you will not gain any of the speed benefits of dynamic page compilation and page caching, and you will not gain access to the functionality encapsulated in the thousands of .NET classes available within an ASP.NET page.

The real answer is that you will have to do some work to get old ASP pages to work within the new ASP.NET framework. You'll have to do some work to migrate your VBScript pages to Visual Basic .NET. You'll have to do even more work to reconstruct your Web site to take full advantage of the ASP.NET framework. In the following sections, I describe several of the important changes between Active Server Pages Classic and ASP.NET.

ASP.NET Unleashed
ASP.NET 4 Unleashed
ISBN: 0672331128
EAN: 2147483647
Year: 2003
Pages: 263

Similar book on Amazon © 2008-2017.
If you may any questions please contact us: