This article is currently in the process of being translated into Chinese (~5% done).

The basics:


歡迎來到ASP.NET指南。根據微軟的說法,“ASP.NET應用了強而有力的,動態的網頁技術,它是.NET框架的一部分”。 這個指南將從零開始教你如何使用ASP.NET,無需任何關於伺服器方面的知識。最好擁有基本的HTMLCSS基礎。如果你已經使用過傳統的ASP或者PHP的話,對於ASP.NET方面沒有任何優勢,因為它是完全不一樣的。

.NET是獨立的語言,意味著可以使用.NET支援的任何一種語言來撰寫.NET應用程式。最常見的編譯ASP.NET的語言是C#和VB.NET。VB.NET是直接基於VB(Visual Basic)產生的,C#是伴隨.NET框架而來的,所以可算是一種新的程式語言。有人稱C#是".NET的語言“,但根據微軟的說法,你可以使用C#或者VB.NET做相同的事情。兩個語言的差異不大,如果你已經使用其中的一種語言,你將可以使用另一個語言而不會有任何問題. 此指南將使用C#語言.

ASP.NET 相對於傳統 ASP/PHP 的一個重要區別是:ASP.NET 是編譯型語言,而傳統ASP是解釋型語言。一些商業產品也可以做到編譯PHP,但是通常情況下它也是解釋型的。

從第一個ASP.NET的版本開始, 這個框架已進行過多次改善及更新, 所以已經有不同的工具給開發者. 在開始建立你的第一個ASP.NET網站前, 我們將於下一篇文章探討這個問題.

ASP.NET - Web Forms or MVC?

When ASP.NET was originally released, there was only one way of doing things. Later on, Microsoft was inspired by frameworks like Ruby on Rails and added the ability to use an MVC (Model-View-Controller) approach for your ASP.NET websites. With that move, ASP.NET was basically divided into ASP.NET Web Forms (the original approach) and ASP.NET MVC. They share a lot of functionality, thanks to the .NET framework, but there are many differences in how to accomplish even the most basic tasks.

In this tutorial, we will focus on the Web Forms part of ASP.NET.

IDE or editor?

This tutorial will use the free Visual Studio Community IDE from Microsoft. Despite what some people think, ASP.NET can be used without an IDE. It would be perfectly possible to write ASP.NET code in Notepad, and use the commandline compiler included with the .NET framework. Some people might actually prefer this "back to basics" way of doing things, but I believe that ASP.NET is best programmed with a decent IDE. You can use an IDE from another vendor, and you will still be able to follow most of this tutorial. We will use Visual Studio Community since it's free, quick to install and easy to use. Besides, using a good IDE will make a lot of things faster in the long run.

Download Visual Studio Community

So, to get started with this tutorial, go ahead and download Visual Studio Community from Here's a direct link to the download page:

As soon as you have downloaded and installed it, you are ready to proceed with the next articles, where we will create your very first ASP.NET website.

Not using Windows?

Don't worry, there's a version for macOS as well - just follow the link above and be sure to select the version of Visual Studio Community for macOS!

This article has been fully translated into the following languages: Is your preferred language not on the list? Click here to help us translate this article into your language!