Difference between .asp and .aspx pages?
I'm new to ASP.NET, and I came across these two different extensions while browsing around. What's the difference be开发者_C百科tween them?
One is Classic ASP (.asp
) and the other is ASP.NET (.aspx
).
Note that this is how these extensions are handled by default. You can remap the extensions to be handled in different ways in IIS.
- ASP runs on IIS. ASPX runs on .Net framework.
- ASP uses VBScript for its code. ASP.NET allows the use of C#, VB.NET and other languages.
- ASP.NET gives access to all the tools which come with the .NET framework and allows one to write object-oriented code.
- ASP.NET offers the ability to build pages composed of controls similar to a Windows user interface.
- ASP.NET offers the programmer the ability to develop applications using an event-driven GUI model, whereas ASP offers conventional Web-scripting environments.
- ASP.NET has compiled code, which means that applications run faster with more design-time errors trapped at the development stage.
- ASP.NET has significantly improved run-time error handling, making use of exception handling using try-catch blocks.
- ASP.NET has an extensive set of controls and class libraries, as well as user-defined controls.
- ASP.NET has the ability to cache the whole page or just parts of it to improve performance.
- ASP.NET has the ability to use the code-behind development model to separate business logic from presentation.
- ASP.NET has the ability to use true object-oriented design for programming pages and controls.
- In ASP.NET, session state can be saved in a Microsoft SQL Server database or in a separate process running on the same machine as the Web server or on a different machine.
- ASP.NET introduces Web Server Controls for providing the UI for the Web form. These controls are state managed controls and are WYSIWYG controls.
- ASP engine executes server-side code, which is always through an interpreter (JScript or VBScript). ASP.NET pages are always compiled into .NET classes housed within assemblies.
- In classic ASP it was very difficult to debug the application. In ASP.NET, pages that are compiled into classes can be debugged using the same debugging tools available to desktop applications or component developers.
- ASP is interpreted, ASP.NET is compiled.
- Classic ASP uses a technology called ADO to connect and work with databases. ASP.NET uses the ADO.NET technology.
- ASP has Mixed HTML and coding logic where in ASP.NET html and coding part are separated by code behind files.
- ASP.NET is purely object-oriented whereas ASP is partially object-oriented.
- There is no in-built support for XML in ASP, whereas ASP.NET has full XML support for easy data exchange.
To oversimplify the answer, its the .net framework.
You can do a quick search to find tons of webpages that specify the diffrences. I found this on SO Difference between asp and asp.net
精彩评论