TOC

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

The basics:

Introduction

歡迎來到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?

最初發布 ASP.NET 時,它只有一種處理方式。後來,微軟受到其他框架的啟發如 Ruby on Rails 等,而增加了使用 MVC 模式(Model-View-Controller) 在於您的 ASP.NET 網站。隨著這一舉措,ASP.NET 基本上分為 ASP.NET Web Forms(原始方法)和 ASP.NET MVC。雖然因 .NET 框架使它們共享許多功能,但在完成最基本的任務方面也存在許多差異。

在本教程中,我們將重點介紹 ASP.NET 裏 Web Forms 的部分。

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.

下載 Visual Studio Community

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

https://www.visualstudio.com/downloads/

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.

非Windows使用者?

別擔心,還有一個適用於 macOS 的版本 - 只需點擊上面的鏈接,並確保選擇適用於 macOS 的 Visual Studio Community 版本!


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!