9866550012
ASP.NET is "ASP" + ".NET". Firstly, ASP.NET is the latest version of Microsoft's Active Server Pages technology (ASP). Secondly, ASP.NET is a part of the Microsoft .NET framework.
Like ASP or PHP, ASP.NET also can be used for creating dynamic and interactive web pages.
ASP.NET was first released in January 2002 with version 1.0 of the .NET Framework, and is the successor to Microsoft's Active Server Pages (ASP) technology.
Before you learn ASP.NET, you should have a basic understanding of HTML and know how to create a basic Web page. Also, you should have some knowledge about Scripting languages like ASP or PHP.
ASP.NET allows you to use a full featured programming language such as C# (pronounced C-Sharp) or VB.NET to build web applications easily.
Theoretically, you can build MS Word as an application and without too much effort make it useable over the Internet through your browser. Because ASP.NET compiles the code you write (instead of interpreting it like traditional ASP) you can write more complex code. After this code is executed for the first time, it is compiled and stored in memory, meaning it will run many times faster than an interpreted language (such as classic ASP). ASP.NET also gives us full server-side object-orientated functionality, such as that found in a normal application.
ASP.NET still renders HTML
Unfortunately, the Internet still has bandwidth limitations and not every person is running the same web browser.
These issues make it necessary to stick with HTML as our mark-up language of choice. This means that web pages won't look quite as amazing as a fully fledged application running under Windows, but with a bit of skill and creative flair, you can make some rather amazing web applications with ASP.NET.
ASP.NET processes all code on the server (in a similar way to a normal application). When the ASP.NET code has been processed, the server returns the resultant HTML to the client. If the client supports JavaScript, then the server will use it to make the clients browser experience quicker and easier. Even with HTML being the limiting factor here, ASP.NET still manages to bring true OOP (Object Oriented Programming) to the Internet.
OOP on the Internet
Object Oriented Programming makes it possible to build extremely large applications, while still keeping your code clean and structured. Now with ASP.NET, we can do the same on the web. Traditional ASP uses HTML and VBScript (or Jscript) to process and render pages, but because VBScript is a scripting language, you were forced to write spaghetti code (VBScript was entwined in the HTML and ended up rather messy in larger applications).
ASP.NET separates code from display, and you can even have pages with no ASP.NET code in them at all. By adding references in your HTML (called controls), you can tell ASP.NET that you want a button here, some text there, and then in your code, you can manipulate what these controls look like, what they display, how big they are, etc.
Controls can do more than just display information. You can add events to controls, so that when a visitor clicks on a button, for example, ASP.NET executes a function of your choice.
Complete Compatibility
One of the most important goals of .NET was to allow developers to write an ASP.NET application using multiple programming languages. As long as each ASP.NET page contains only one programming language, you can mix and match different pages using different languages and they will work together seamlessly. This means you can now have a team of developers with half programming in C#, and the other half in VB.NET, with no need to worry about language incompatibilities, etc.
A cool little side-affect of all this is that all the programming languages look very similar, and differ only by their language syntax.
Take the following code snippets for example. They both do exactly the same thing but the first is written in C#, and the second in VB.NET.
The C# version:
void Page_Load(Object S, EventArgs E) { myLabel.Text = "Hello world!!";
</script>
The VB.NET version:
Sub Page_Load(S As Object, E As EventArgs) myLabel.Text = "Hello world!!"
End Sub
</script>
If you take either of the code examples shown above and add the following HTML to them, then they would both run perfectly inside of an ASP.NET page:
<head>
<title>"Hello World" example!</title>
</head>
<body>
<asp:Label id="myLabel" runat="server" />
</body>
</html>
Web Services
One great feature of ASP.NET are Web Services. Web services mean that you can literally have several pieces of your application on different servers all around the world, and the entire application will work perfectly and seamlessly. Web services can even work with normal .NET Windows applications.
For example: A lot of people would like to have a stock ticker on their web site, but not many people want to manually type in all changes to the prices. If one company (a stock broker) creates a web service and updates the stock prices periodically, then all of those people wanting the prices can use this web service to log in, run a function which grabs the current price for a chosen company, and return it. Web services can be used for so many things: news, currency exchange, login verification.. the ways in which they can be used are limited to your imagination!
Custom Controls
In ASP.NET, you can create your own custom controls, along with those already provided. A good example of a custom control is a date selector. There are so many different date formats that validation of dates can become a pain, even more so if your visitor has to type in their date 5 times before it is accepted.
Instead of getting users to enter a date manually, we can let them use a date selector containing 3 drop down lists: day, month, and year. The day list has numbers 1-31, the month list has all of the month names, and the year list has a list of numbers from 1900 to 2050. The user now selects a day, month, and year, and your control returns that value in your specified format. You can even set a default value by passing a simple mm/dd/yyyy or dd/mm/yyyy date to the control before it is rendered.
Class Library
ASP.NET includes an enormous class library which was built by Microsoft. Because this class library is so large, it encapsulates a a huge number of common functions. For example, if you wanted to retrieve data from a database and display that data in a simple grid control through classic ASP, then you'd have to write quite a lot of code.
In ASP.NET, you don't write any code to display the data: you just write the code to bind the data to an object called a DataGrid (which can be done in just a couple of lines). Then, you just have to create a reference on your page to where that DataGrid should go. The DataGrid will be rendered as a table, and will contain all of the data extracted from the database.
One great feature of ASP.NET are Web Services. Web services mean that you can literally have several pieces of your application on different servers all around the world, and the entire application will work perfectly and seamlessly. Web services can even work with normal .NET Windows applications.
For example: A lot of people would like to have a stock ticker on their web site, but not many people want to manually type in all changes to the prices. If one company (a stock broker) creates a web service and updates the stock prices periodically, then all of those people wanting the prices can use this web service to log in, run a function which grabs the current price for a chosen company, and return it. Web services can be used for so many things: news, currency exchange, login verification.. the ways in which they can be used are limited to your imagination!
Custom Controls
In ASP.NET, you can create your own custom controls, along with those already provided. A good example of a custom control is a date selector. There are so many different date formats that validation of dates can become a pain, even more so if your visitor has to type in their date 5 times before it is accepted.
Instead of getting users to enter a date manually, we can let them use a date selector containing 3 drop down lists: day, month, and year. The day list has numbers 1-31, the month list has all of the month names, and the year list has a list of numbers from 1900 to 2050. The user now selects a day, month, and year, and your control returns that value in your specified format. You can even set a default value by passing a simple mm/dd/yyyy or dd/mm/yyyy date to the control before it is rendered.
Class Library
ASP.NET includes an enormous class library which was built by Microsoft. Because this class library is so large, it encapsulates a a huge number of common functions. For example, if you wanted to retrieve data from a database and display that data in a simple grid control through classic ASP, then you'd have to write quite a lot of code.
In ASP.NET, you don't write any code to display the data: you just write the code to bind the data to an object called a DataGrid (which can be done in just a couple of lines). Then, you just have to create a reference on your page to where that DataGrid should go. The DataGrid will be rendered as a table, and will contain all of the data extracted from the database.
Great XML Support
ASP.NET makes it simple to use XML for data storage, configuration and manipulation. The tools which are built into ASP.NET for working with XML are very easy to use. XML is excellent for storing information that rarely changes, because you can just cache that information in the computers memory after it has been initially extracted.
ASP.NET makes it simple to use XML for data storage, configuration and manipulation. The tools which are built into ASP.NET for working with XML are very easy to use. XML is excellent for storing information that rarely changes, because you can just cache that information in the computers memory after it has been initially extracted.
Active Server Pages Framework (.aspx) is a server side programming language capable of building powerful web applications. Asp.Net has built in capabilities which make easier for programmers to build applications. With Asp.net you can create dynamic web pages, access databases, send emails, manage file system and much more.
Language Selection
Asp.net requires a support language. The .Net Framework has support for several programming languages with the following as the most popular ones:
- VB (Visual Basic)
- C# (C Sharp)
- JScript
To specify the selected language a Page Directive is included on an Asp.Net document:
<%@ Page Language=”VB” %>
Active Server Pages or ASP, as it is more commonly known, is a technology that enables you to make dynamic and interactive web pages.
ASP uses server-side scripting to dynamically produce web pages that are not affected by the type of browser the web site visitor is using.
The default scripting language used for writing ASP is VBScript, although you can use other scripting languages like JScript (Microsoft's version of JavaScript).
ASP pages have the extension .asp instead of .htm, when a page with the extension .asp is requested by a browser the web server knows to interpret any ASP contained within the web page before sending the HTML produced to the browser. This way all the ASP is run on the web server and no ASP will ever be passed to the web browser.
Any web pages containing ASP cannot be run by just simply opening the page in a web browser. The page must be requested through a web server that supports ASP, this is why ASP stands for Active Server Pages, no server, no active pages.
As ASP was first introduced by Microsoft on it's web server, Internet Information Services (IIS), that runs on Windows 2000/XP Pro/NT4, it is this web server that ASP pages usually run best on.
For those of you running Windows and wish to play around with ASP on your own system you will need to install Microsoft's Internet Information Services (IIS). Lucky IIS or its micro version Personal Web Server (PWS) comes free with Windows.
For Windows users you can find Internet Information Services (IIS) or Personal Web Server (PWS) in the following places: -
Windows 2000/XP Pro - IIS can be found in 'Add/Remove Programs' in the 'Control Panel'.
Windows 98 - PWS can be found under 'add-ons' on the Windows 98 CD.
Windows NT4/95 - You can get hold of IIS by downloading the NT4 Option Pack from Microsoft (don't be fooled by the name as it also runs on Windows 95).
Windows ME - IIS and PWS are not supported on this operating system.
Windows XP Home Edition - IIS and PWS are not supported on this operating system.
No comments:
Post a Comment