Open In App

Difference between ASP and ASP.NET

Improve
Improve
Like Article
Like
Save
Share
Report

ASP stands for Active Server Pages. It is a development framework used for building web pages. ASP was introduced in 1998 by Microsoft as its first server-side scripting language. The file extension of ASP pages are .asp and are normally written in VBScript. It is an old but still powerful tool for making dynamic web pages. ASP is a technology (much like PHP) for executing scripts on a web server.

Example: 

html




<!DOCTYPE html>
<html>
 
<body>
    <%response.write("Welcome to GeeksforGeeks!")%>
</body>
 
</html>                   


Output: 

Welcome to GeeksforGeeks!

ASP.NET: ASP.NET was released in 2002 by Microsoft as a successor to ASP. It is also a server-side web framework, open-source, which is designed for the generation of dynamic web pages. The file extension of ASP.NET pages is .aspx and is normally written in C# (C sharp). The latest version of ASP.NET is ASP.NET 4.6.

Example: 

csharp




@{
    var rank = 50;
}
<html>
<body>
@if (rank < 60)
{
    <p>Welcome to GeeksforGeeks!</p>
}
</body>
</html>


Output: 

Welcome to GeeksforGeeks!

Difference between ASP and ASP.NET: 
 

ASP ASP.NET
ASP is the interpreted language. ASP.NET is the compiled language.
ASP uses ADO (ActiveX Data Objects) technology to connect and work with databases. ASP.NET uses ADO.NET to connect and work with databases.
ASP is partially object-oriented. ASP.NET is fully object-oriented.
In ASP there is no facility to separate design from programming logic.  In ASP.NET it has the option of Code Containment.
ASP Pages have the file extension .asp. ASP.NET Pages have the file extension .aspx.
ASP doesn’t have the concept of inheritance. ASP.NET inherit the class written in code behind.
ASP pages use scripting language. ASP.NET uses a full-fledged programming language.
Error handling is very poor in ASP. Error handling is very good in ASP.NET.
In ASP debugging is difficult because the ASP scripts are interpreted.  In ASP.NET debugging is easy.
ASP is not a configurable language.  In ASP.NET Web.config is used for configuration.
ASP has maximum four in-built classes i.e. Request, Response, Session and Application. ASP.NET has more than 2000 in-built classes.
Custom Controls can not be achieved by ASP. Custom Controls can be achieved by ASP.NET using @register directive.

 



Last Updated : 12 Jul, 2022
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads