Wednesday, 4 July 2012

ASP.NET Tutorial


About this Tutorial

Welcome to ASP.NET Tutorial (Using VB.Net and C#). By completing the lessons and exercises in this book, you will acquire the skill and knowledge necessary to develop large enterprise web-based application in C#.

This tutorial is specially designed for the beginners and students who are in the starting point of their IT carrier. Plain and simple English is used throughout the tutorials so that every one can understand the concepts we are discussing.



Intended Audience

The targetted audience for this tutorials are:
  • Engineering and Computer Science Students
  • Beginner level programmers who want to develop their career in ASP.NET based web development.
  • Senior programmers who like to switch over to ASP.NET web programming.

What you need to know before you start ?

This tutorial required that students meet the following prerequisites:
  • Have a basic understanding of the Object-oriented programming concepts including classes, properties, methods and events.

What do we offer ?

The ASP.NET tutorials in this site includes several chapters. We are still adding more and more chapters everyday.

Many chapters in this tutorials include small small exercises you can try on your computer.

By end of this tutorials, we will start an advanced demo' project. We will lead you through each and every step of developing a large dynamic website.

ALSO, SOME OF THE LAST CHAPTERS WILL GUIDE YOU THROUGH THE WEB WORLD WHICH MAY HELP YOU DEVELOP AND OWN YOUR COMMERCIAL WEBSITES AND EVEN MAKE MONEY FROM RUNNING YOUR OWN WEBSITES.




Requirements to develop a Web Application (Web Site)


Infrastructure to develop a web application (web site)

Any one who want to develop a web application must have the following systems:
1. A web server.
2. An editor to develop the web pages.
3. A browser to view the web page you develop.
4. A database program like MS Access, SQL Server etc, if your web site need to save data into a database.

In the real world situation, a web server will be hosted on a secure server, located in a safe place and will be always connected to high speed internet. However, to develop a web application, you don't need to worry about security and internet connectivity. You can use your own development computer as the 'Web Server'.

So, your development computer must have all the 4 systems mentioned above.

Since this tutorial is guiding you to develop web sites using ASP.NET, all the tools we are going to talk here will be the ASP.NET specific tools.

Web Server


There are several types of web servers. But if you like to develop ASP.NET web applications, you need a specific web server called 'Internet Information Server' (IIS).

Editor to develop web pages


Ideally, you do not need any special editor to develop a web application. If you are an expert, you can simply use ntoepad to type HTML and the code for the web pages. However, who want to hand-wash the vessels when there is a dish washer ?!

You don't need to make your hands dirty! Microsoft gives a tool called 'Visual Studio .NET' to edit web pages and write code for ASP.NET.

Visual Studio .NET (VS.NET)


Visual Studio .NET allows to easily create web pages. Some of the benefits in using Visual Studio .NEt are:

  • You can simply drag and drop html controls to the web page and VS.NET will automatically write the HTML tags for you.
  • Start typing an HTML tag and VS.NET will complete it! When you start typing a tag, VS.NET will show you the HTML tags starting with the characters you typed. So, you don't need to even remember all the tags.
  • If you type any HTML tags wrong, VS.NET will highlight the errors and tell you how to correct it.

So, even if you are not an expert, VS.NET can help you develop great web pages.

Browser


You need a browser to view the web pages you create. If you have any windows operating system in your computer, you will already have a free browser (called 'Internet Explorer')

Database program


A database program like MS Access or SQL Server is required only if you need to save data into database. It is not mandatory that all web sites need a database program.

Applications


Windows Applications and Web Applications



This article gives an introduction to various types of computer programs and explains the concepts behind a web application.
Developers are often confused about the difference between Windows Applications and Web Applications. This chapter gives brief information about various types of computer applications and provides an introductions to web applications.

Different types of computer applications


It is very hard to divide applications into any strict categories. There is no clear definition exists to categorize computer applications. However, here is a small list of different types I can think of:

1. Embedded Systems
2. Windows applications (also called 'Desktop applications')
3. Web Applications

Embedded Systems



Have you ever used a digital diary (also called 'digital organiser') or a mobile phone ? Do you know when you save a name and address, how does it get saved in it?

It is a small computer program 'Embedded' in that device. It is similar to any small address book computer program that you can write using your favorite visual basic or c++. The only difference is, it is written using soem special language and 'embedded' into a chip in the device inside the mobile phone or digital diary.

If you find a bug in a regular computer program, you can simply write a better program, compile it and copy to your computer. But if you find a bug in your mobile phone's embedded program, you cannot copy it! The manufacturer has to embed the new program in a new chip and replace the chip in your mobile phone!!

Windows applicaitons


If you don't know what is a 'Windows Application', probably you have never seen a computer. Almost any application you see on a desktop computer is called 'Windows Application'.

It is also called 'desktop applications' since they are mostly used in desktop computers.

Some common examples of desktop applications are:

1. Paint Brush program
2. Calculator program
3. MSN Messenger
4. Yahoo Messenger

The first three windows applications are written by some programmers sitting in Microsoft office and they give it free to all who buy Windows operating system. The Yahoo messenger is written by Yahoo programmers and they give it free to download from their web site.

If your neighbour ask you to write small 'Address book' application for his personal use, you are going to write a 'windows application'.

Now you must have a good idea of what is windows application.

Web Applications


I am sure you have seen atleast one web application! Do you know how I guessed it?

It was easy to guess. This tutorial is a web application and you are currently reading this tutorial from our web site (unless you copied it to somewhere...)

So, what is a web application ?


A web application is also called 'web site'. A web site is a collection of web pages hosted on a special computer called 'web server'.

Now you are reading this tutorial. This chapter is a page among several other pages part of our web application. The name of our web application is 'AspSpider.com'. This web site (web application) is running in our web server, which is located in a safe place in USA. You are a 'visitor' to our site and you are accessing our web application using a tool called 'Internet Explorer' (or, some other browser like Netscape etc). We don't know where you are (we have several ways to find it, which we will explain in some other chapter)

So, here is some interesting points about a web application:


  • A web application is a collection of web pages.
  • A web application needs a web server to run.
  • Web server can be located anywhere and visitors need not be even in the same country of the web server.
  • Visitors can access the web application using a tool called 'browser'. There are many browsers exists. Most widely used browser is 'Internet Explorer'. This is provided by Microsoft and it is free. Another famous free browser is 'Netscape'.