HomeASP.NET Develop Your First ASP.NET Website with Vi...
Develop Your First ASP.NET Website with Visual Web Developer Express
This article focuses on the objective of running your first ASP.NET website on your Windows XP Home computer using Visual Web Developer Express. If you still do not have IIS/ASP.NET installed in your computer (which XP Home does not have by default), no worries. The complete installation of Visual Web Developer Express will do everything for you.
ASP.NET is a web programming platform owned by Microsoft. It is used for doing server side scripting just like PHP, the most popular server side scripting language.
There are a lot of reasons to work with the ASP.NET platform. It all depends on the expectations you have set for your personal/commercial website project. Some IT professionals on the web have already pointed out some reasons why you may want to work with an ASP.NET platform. According to Sitepoint, you gain the following advantages:
Speed. When you are talking about "speed," you can run websites faster in ASP.NET as compared to PHP. There are a lot of scientific tests that support this.
More language support. Unlike PHP, where only one language is involved, you use several languages of your choice (such as VB.NET, C#, etc) when developing an ASP.NET websites.
A user-friendly development environment. In ASP.NET, the editors that you will be using are provided by Microsoft and can provide very powerful help for writing, editing and debugging scripts. Plus, it is included for FREE. An example of this is the Visual Web Developer Express.
Expanding your development skills in a Windows .NET environment. If you know how to develop ASP.NET websites, bear in mind that this is only aspect of .NET's applications. In this case, it would be very easy for you to develop other Windows applications that depend on .NET (not only ASP.NET). This makes you a versatile Windows technology based developer.
ASP.NET is cheap to develop. This means that the code editor, local practice Web server, and FTP client are provided for free in ONE INSTALLATION PACKAGE.
Okay, let's start developing your first ASP.NET website.
To maximize your set of tools available for developing your first ASP.NET website, the following is required:
A valid installation of the Windows XP Home operating system. This should be capable of receiving frequent Windows updates.
A connection to the Internet.
You may think that ASP.NET is a server-side scripting language. In fact, it isn't. Instead, it is a web development platform that can be powered by several Microsoft-based programming languages. This is entirely different from PHP, which is a server-side programming language.
Also ASP.NET is an entirely different thing when compared to the classic ASP. You can see these differences with the file extension used for the generated pages. ASP.NET has an .aspx extension while the classic ASP has .asp extension.
Below is a basic flowchart of how you will be able to develop websites in ASP.NET as compared to PHP (notice the minor difference):
If you plan to develop websites with ASP.NET, you need to select the programming language of your choice.
Okay, it's time to get started. Let us install Visual Web Developer Express as an important part of your ASP.NET tools.
It would be very hard or almost impossible to develop a modern ASP.NET website without Visual Web Developer Express. This is an editor with which you can write, edit and debug scripts. The following is the installation procedure:
Step 1: Go to http://www.asp.net/downloads/essential/
Step 2: Select "Visual Web Developer 2008 Express Edition SP1" (this is the stable release at the time this article was written), as well as the language of your choice. Download the file to your desktop or other convenient location on your computer. (See screen shot below)
Step 3: After downloading, right click on the installer, and then click "Open."
Step 4: The setup screen will then be displayed. Click "Yes, send information about my setup experiences to Microsoft Corporation."
Step 5: After agreeing to the terms and conditions, click Next and then select "Microsoft SQL Server 2008 Express Edition (x86)." This is the ASP.Net database which you will use in future website development. This is the Microsoft equivalent of MySQL in open source technologies.
Step 6: After clicking on "YES," you will be downloading the required files to run ASP.NET. Click "Install." This will take time to download (~100 MB file size). If the installation asks you to restart, then restart your computer to continue the installation. You can tell if the setup has been completed if it displays "Microsoft Visual Web Developer 2008 Express Edition with SP1 has been installed successfully." Finally, click "Exit"
Step 7: Register your product. This step is optional, but recommended.
Step 8: Launch the program by going to Start -> All Programs -> Microsoft Visual Web Developer 2008 Express Edition.
Step 9: This will open the "Start Page." Proceed to the next section for the creation of your first ASP.NET webpage.
Once you have started Visual Web Developer 2008 Express, on the upper left side of the "Start page" you can see "Recent Projects" (this is above "Getting started"). Go through the following procedures:
Click Create -- > Website.
Select the choices based on the screen shot below:
You can change the file path to any drive where you would like to store your files.
Visual Web Developer will then give the default script after clicking OK:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
HELLO WORLD, IF YOU SEE THIS MESSAGE..
<br />
YOU HAVE CREATED YOUR 1ST ASP.NET WEBPAGE.
<br />
WITHOUT PROBLEMS.
</div>
</form>
</body>
</html>
Copy and paste the code above to default.aspx source. Then click save.
To view our newly edited default.aspx in the browser, click File -> View in Browser. This should display the default.aspx in the browser with the intended message. See screen shot below:
The generated URL is: http://localhost:1206/website/Default.aspx
Visual Web Developer automatically opens port 1206 to run your first ASP.NET web page.