Introduction: Microsoft previous
server side scripting technology ASP (Active Server Pages) is now often called
classic ASP. ASP.NET is an entirely new technology for server side scripting. It
was written from the ground up and is not backward compatible with classic ASP.
ASP.NET is a Microsoft Technology. ASP stands for Active Server Pages .ASP.NET
is a program that runs inside IIS (Internet Information Services) is Microsoft's
Internet server. IIS comes as a free component with Windows servers. IIS is also a
part of Windows 2000 and XP Professional. An ASP.NET file is just the same as an
HTML file. An ASP.NET file can contain HTML, XML, and scripts. Scripts in an
ASP.NET file are executed on the server. An ASP.NET file has the file extension
".aspx".
ASP.NET is more than the next version of Active
Server Pages (ASP). it provides a unified Web development model that includes
the services necessary for developers to build enterprise-class Web
applications. While ASP.NET is largely syntax compatible with ASP it also
provides a new programming model and infrastructure for more scalable and stable
applications that help provide greater protection.
Problems with Traditional ASP:
- Interpreted and Loosely-Typed Code
- Mixes layout (HTML) and logic (scripting
code)
- Limited Development and Debugging Tools
- No real state management
- Update files only when server is down
- Obscure Configuration Settings
Advantages of
ASP.NET:
- Separation of Code from HTML
- Support for compiled languages
- Use services provided by the .NET
Framework
- Graphical Development Environment
- State management
Example: In this example we have simple
set the button inASP.NET.
Code:
<script runat="server">
Sub submit(Source As Object, e As EventArgs)
button1.Text="You clicked me!"
End Sub
</script>
<html>
<body>
<form runat="server">
<asp:Button id="button1" Text="Click me!" runat="server"
OnClick="submit" />
</form>
</body>
</html>