Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

Getting Started with ASP.NET

Learn what it takes to begin building ASP.NET Web sites with Visual Studio .NET. This article will provide you with the knowledge you need to jumpstart your foray into the world of ASP.NET development.


advertisement
efore we can dive in and begin building Web pages with ASP.NET, I want to introduce a few topics and new terminology.

.NET Framework
Microsoft designed classes in the .NET Framework to accommodate your current programming needs and beyond. It contains classes for many activities including manipulating text, working with database data, and working with the file system. The .NET Framework also contains classes that represent the basic data types including integers, bytes, strings, and arrays. You should learn one of the .NET languages, but it is vital that you learn about the .NET Framework. Do you have to know how to use every class in the Framework before you can become an effective .NET developer? No, but there are quite a few classes you need to learn about before you will make any substantial headway. When it comes to developing in .NET, the Framework is everything.

Fast Facts
ASP.NET is actually built into the .NET Framework. You technically don't even need Visual Studio .NET to write ASP.NET code.

Interesting Fact #1: For more information about programming languages supported in .NET see the CoDe Magazine Sep/Oct 2002 issue.
Namespaces
As you can probably imagine, the entire .NET Framework is huge. It is comprised of thousands of classes, or as astronomer Carl Sagan might say, "billions and billions!" Management and classification of this enormous list of classes requires an organizational mechanism. The organizational mechanism that manages the .NET Framework is called a namespace. Simply put, a namespace is a logical grouping of classes. For example, the System.Web namespace stores all of the classes that relate to working with browser-server communication.

The .NET Framework organizes namespaces into a hierarchical tree structure. The System namespace resides at the root of this tree. It contains all of the classes for working with the base data types, random numbers, dates, directories, and other system resources.

To uniquely identify a class in the .NET Framework, you reference the class by its full namespace and class name. For example, to refer to the File class contained in the System.IO namespace you would use:

System.IO.File


Table 1 shows a partial list of standard namespaces.

Table 1: Partial list of standard namespaces.

Namespace



Description

System

The root namespace for the entire .NET Framework. Contains the base types and other useful classes.

System.Collections

Contains classes for working with the standard collection types.

System.Configuration

Contains classes for working with Web configuration files (web.config).

System.Data

Contains classes for interaction with data sources (ADO.NET).

System.DirectoryServices

Contains classes for accessing Active Directory Services.

System.IO

Contains classes for reading and writing files.

System.Text

Contains classes for working with strings.

System.Xml

Contains classes that process XML data.


.NET Languages
.NET supports a number of languages. By default, Visual Studio .NET installs Visual C# .NET (usually abbreviated as C# and pronounced c-sharp), Visual Basic .NET, and Visual C++ .NET. The two languages most commonly used in .NET are Visual Basic .NET and C#. Other languages that have been ported over to .NET include COBOL, Eiffel, and PERL. I'll use Visual Basic .NET throughout this article.

File Extensions
As is the case with just about every new development environment, you're going to need to be aware of a few new file extensions in Visual Studio .NET.

Table 2 lists common file extensions that ASP.NET uses.

Table 2: Common ASP.NET file extensions.

Extension

Description

.aspx

ASP.NET page file

.ascx

ASP.NET User Control file

.asmx

Web service file

.aspx.vb

Visual Basic .NET code file for an ASP.NET page

.aspx.cs

C# code file for an ASP.NET page

.sln

Visual Studio .NET Solution file


Set Up and Installation
In order to run ASP.NET Web Forms you need to have Internet Information Server (IIS) and the .NET Framework Software Development Kit (SDK) installed on your machine (installing IIS is beyond the scope of this article).

Notice I didn't say you need Visual Studio .NET installed on your machine to build and run ASP.NET Web Forms. Just like standard HTML, you can create your ASP.NET Web Forms in any text editor. However, we'll use Visual Studio .NET as the development environment.



Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap