by kirupa |
30 July 2006
The classic "hello, world" application has been used since the 1970's to test
whether a programming language works. Since then, it is customarily used to as
the first example a programmer new to a computer language creates. In this case,
it will also be used as the first of, what I hope to be, many .net tutorials
that I will be writing. So it is only fitting, that this tutorial uses the
classic "hello, world" as both the starting point for you to get familiarized
with .net and for me to get familiar with writing tutorials for a new language.
Creating a basic console-application running on your PC is
fairly simple, and many sites on the web cover how to do that. Instead, I
will explain how to create a simple application for the web using ASP.NET. So to
get started, you will need to install Visual Studio.
If you are using the full retail/academic version Visual
Studio 2005, you are already set. If you do not have
Visual Studio 2005, you can freely download the
fully-featured Express edition from the following
link. More specifically, for this tutorial
you will need to install
Visual Web Developer Express.
The Express editions of Visual Studio contain most of
all the features you would normally use for light to
moderate application development. The Express editions
are not shareware/trial-ware, etc. They are fully
featured applications that contain a subset of the most
often used features found in the full-blown Visual
Studio package. All .NET tutorials on this site will be
written with the Express editions of VS in mind.
The following steps will help you to create a HelloWorld
.NET application that you can preview in your browser.
- Launch Visual Studio or Visual Web Developer
Express. Go to File | New | Web Site. From the Templates
area select ASP.NET Web Site, ensure File
System is selected under the Location drop-down
menu, and select Visual C# under the Language
drop-down menu:

[ ensure your
project is a ASP.NET Web Site with the Visual C# Language
preference ]
- Press OK after you have made the above
selections. A few moments later, your project will be
created. Your interface should look similar to the
following image (click on image for larger view):

[ your interface -
click on image for larger view ]
- In order to display our "hello,
world" text, we will need some container-like object. In
our case, that container-like object (component) will be
a Label. Before we can do that, let's switch to
the Design View. So, at the bottom-left corner of your
window, click on the Design link to go into the Design
View:

[ click on the
Design link to go to the Design view ]
We're on the right track, but there is more
material to cover. In the next
page, you will add and customize a Label component.
Onwards to the
next page.
|