Introduction: In this tutorial we will introduce new technology for building websites. This new technology is known as Asp.net. Asp.net allows developer to build applications faster. This is achieved due to fast that Asp.net makes use of rich class libraries provided by Microsoft. net framework. Classic Asp:
Asp, which is now more commonly known as Classic Asp was used extensively in 1990's. The idea of creating dynamic pages and linking them with database was main purpose of classic Asp. Asp used html controls for user interaction. Apart from good features available in Asp programming, it also lacks in some of major areas. These areas include clean coding as asp pages were incline pages and all business logic as well as interface was coded in a single page. This produces many problem when code had to be updated or modified. Asp pages also lacked performance and scalability which were fixed in Asp.net. Lets see what Asp.net technology has to offer a developer to build dynamic pages much faster.
Asp.net Web Applications:
Asp.net is based on .NET framework for building web applications. Since Asp.net is a part of Microsoft. NET Framework it has ability to take advantage of rich class libraries provided by Microsoft. The question is that why should one use Asp.net and not use classic asp or any other web programming technology. Here are some of features of Asp.net that makes it best web application technology.
Use of Controls:
Asp.net provides developer with several controls to perform basic as well as advanced operations. Controls provided in Asp.net falls under HTML Controls, HTML Server Controls and Web Server Controls.
HTML Controls:
Html controls are basic controls that are executed on client machine. These controls include textbox, label , image etc. A simple example of html control can be given by following code which renders an image.
As you see HTML controls are very easy to use but they don't provide much features. Microsoft decided to introduce HTML Server controls which extends functionality of simple HTML Controls.
HTML Server Controls:
HTML Server Controls looks exactly like HTML Controls with one difference that they are executed on server rather than client. A simple example of HTML Server controls is given below:
just add a runat server attribute with image tag.
As you can see that image tag or control looks exactly like one that we have previously discussed. But it has an additional attribute which is runat. The runat attribute denotes that this is a HTML Server Control and will be executed on Server rather than client.