ASP.NET is a powerful and flexible server side technology, which is used for developing dynamic Web pages. The heart of ASP.NET technology is Microsoft’s .NET Framework, which provides the core technology. The .NET framework contains a vast set of programming classes designed to satisfy any programming needs and ASP.NET is just one of the components.
The .NET framework is designed to help and solve several fundamental problems and issues faced by the programmers such as:
It leads to time saving while building large, reliable applications.
It allows programmers of different languages to work on applications.
It provides an easier, cheaper and faster way to get efficient programs into the hands of the user.
It allows programmers to unify two kinds of architectures- applications that run locally on the machine and applications that are accessed over the Web.
Using .Net there is no need to write a complex code with complicated languages to get impressive results.
The .NET Framework Class Library
Imagine that you have to support multiple programming languages - such as Visual Basic, and C++. Many of these languages overlap. For example, for each language, you have to include methods for accessing the file system, working with databases, using different methods and manipulating strings.
Furthermore these programming languages have similar programming constructs. For example every language can represent loops and conditionals. Even though the syntax of a conditional, written in Visual Basic differs from that written in C++, the programming functions the same.
Finally, most programming languages have similar types of variable data. In most languages, you have some means of representing strings and integers.
For example, the maximum and minimum size of an integer may depend on the language, but the basic type of data is the same.
It requires a lot of work to maintain this functionally for multiple languages. Therefore .NET Framework consists of a vast set of classes designed to satisfy any conceivable programming need.
For example the .NET Framework contains classes for handling database access, working with the file system, manipulating text, and generating graphics. In addition, it contains more specialized classes for performing tasks, such as working with regular expressions and handling network protocols.
The .NET Framework also contains classes that represents all basic variable data types such as strings, integers, bytes, characters and arrays. The motive here is to explain that you can access any of .NET Framework classes even when you are building your ASP.NET pages.
Understanding Namespaces
The .NET Framework contains thousand of classes (over 3500). Fortunately, the classes are not simply jumbled together but they are organized into a hierarchy of namespaces. You can define namespace as a logical grouping of classes.
For example; all the classes that relate to working with the file systems are gathered together into the System.IO namespace.
Avoiding Confusion Between ASP and ASP.NET
ASP
A server side technology for creating dynamic web pages using script language only.
ASP.NET
A server side technology for creating dynamic Web pages that allows the use of any full fledged programming language supported by .NET.
The Installing Process
Operating System
Windows NT4.0 with service pack 6a, Windows 2000 (all versions - no service pack required), Windows XP Professional, Windows 2003.
Make sure IIS is running on your operating system by typing http://localhost in your browser’s address bar.
Installing MDAC 2.8
Installing .NET Framework 1.1 Redistributable
Installing .NET Framework 1.1 SDK
Installing Web Matrix You should have MDAC and .NET Framework installed on your machine. The web matrix is an application development tool, used to create both ASP.NET and ASP pages.installation is optional i.e. without installing Web Matrix we can develop and run ASP.NET pages by using notepad or WordPad as in the case of HTML, Jscript and ASP.
Starting the Web Server
Typehttp://localhostin your browser’s address bar. If you get the welcome screen then your web server is running fine otherwise troubleshoot it from Internet Information Service (IIS) Manager (i.e. Through Control Panel à Administrative Tools).
Building a Simple ASP.NET Page
To convert a normal, HTML page into ASP.NET, first open either Web Matrix or notepad on your computer and enter the HTML page as shown in example 1. Save this page as SimpleHtmlPage.aspx in your inetpub/wwwroot or any other virtual directory. The extension used for ASP.NET is. aspx.
Noted
When you create an ASP.NET page, make sure that it is saved in the directory that can be accessed by your web server.
You need to save the page in inetpub/wwwroot directory or in subdirectory or any other virtual directory of your Web server.
After the page have been saved, do not open the page directly in your browser by typing the path of the page (like in HTML). Instead, open the page like this: -
If your root directory is Inetpub/wwwroot: -
Open the page by typing the following page in the address bar of your browser: - http://localhost/SimpleHtmlPage.aspx
Here localhost is your computer’s name and SimpleHtmlPage.aspx is the name of your ASP.NET page, which is inside your root directory.
If you have a virtual directory named ExpertRating:
Open the page by typing the following page in the address bar of your browser: http://localhost/ExpertRating/SimpleHtmlPage.aspx
Here localhost is your computer’s name and ExpertRating is your virtual directory and SimpleHtmlPage.aspx is the name of your ASP.NET page, which is inside the virtual directory.