這是我第一次翻譯作品,所以尚有很多不足之處還請各位多多指教,本文為工作空餘時間所翻譯,所以有些地方翻譯得不夠精確,沒有專門查詢專業字典,有的語句還沒有翻譯,所以望各位多多包涵,在以後的翻譯中會不斷提高,盡量地做得更好,因為第一次翻譯肯定會有很多錯誤,所以連同英文一併貼出,望各位高手多多批評、指正。
Introducing ASP.NET 2.0
ASP.NET 2.0 簡介
http://www.c-sharpcorner.com/UploadFile/anandn_mvp/IntroducingASP.NET2.005292006112235AM/IntroducingASP.NET2.0.aspx
By Anand Narayanaswamy May 30, 2006
作者Anand Narayanaswamy 2006年5月30日
譯者:SPARON 2006年5月30日
In this article, the author examines the fundamentals of ASP.NET 2.0 with
在這篇文章裡,作者研究了ASP。NET 2。0的基本原理.
ASP.NET is an exciting server side technology used for developing web based applications. It uses the namespaces, classes and methods provided by the .NET Framework. ASP.NET 2.0 is the popular framework and latest among developers. Nowadays, developers are working to convert existing ASP.NET 1.1 applications to 2.0 to take advantage of its rich features. ASP.NET 2.0 has simplified the work of developers by providing many new controls. You can perform all tasks using Wizards. There is no need to write long lines of code even for database access.
ASP.NET是一項令人激動的伺服器端開發WEB架構語言.它使用命名空間、類和方法
In this article, you will learn how to develop ASP.NET 2.0 applications with C# programming language.
在這入篇文章當中,你將學到如何使用C#語言開發ASP.NET應用程式.
Basic Requirements
基本要求
You need a computer with a minimum of 512 MB of RAM to properly develop and execute ASP.NET applications. Firstly, you should install .NET Framework SDK 2.0. The SDK can be downloaded from the website of Microsoft.
你的電腦要求最小記憶體512MB來運行ASP.NET應用程式.首先,你必需安裝.NET Framework SDK 2.0.你可以從Microsoft網站下載到該SDK.
Visual Studio 2005 is not compulsorily required for developing ASP.NET applications. You can make use of Notepad as an editor for entering source codes. Visual Studio 2005 will greatly simplify the development task as you can drag and drop controls from the Toolbox. It also comes with Intellisense which will help you to complete the code. I will show you how to make use of both these editors for developing ASP.NET applications.
開發ASP.NET 不是必需使用Visual Studio 2005 .你也可以使用記事本來編寫原始碼, Visual Studio 2005將簡化操作步驟,你只需將控制項輕鬆的從工具箱拖放到設計視窗.我將教你如何使用這兩者來建立ASP.NET應用程式.
You can also use Visual Web Developer Express which is available for download free of cost. Microsoft had recently announced that Express versions will be always free. It is a light weight editor and its interface looks like Visual Studio 2005.
你同樣可以使用Visual Web Developer Express,它是免費下載的。微軟最近宣布體驗版的將永遠免費。這是簡化的編輯器,但是它的介面看起來像Visual Studio 2005
I assume that you have installed .NET Framework 2.0 on your system. Notepad comes with the Windows operating system so there is no need to install it separately. Let us examine how to write a simple ASP.NET program with Notepad as the editor.
假設你已經安裝了.NET Framework 2.0.記事本是windows內建的不需要額外安裝.讓我們來研究如何使用記事本編寫ASP.NET執行個體程式.
Fire up Notepad, enter the following code and save the file as Welcome.aspx. This file is called as a WebForm. Each and every ASP.NET page is termed as a WebForm.
開啟記事本,輸入下面代碼並儲存為Welcome.aspx.
<%@ Page Language="C#" %>
<script runat="server">
void Button1_Click(object sender, EventArgs e)
{
TextBox1.Text = "Welcome to ASP.NET";
}
</script>
<html>
<head>
</head>
<body>
<form id="Form1" runat="server">
<p>
<asp:TextBox id="TextBox1" runat="server"></asp:TextBox>
</p>
<p>
<asp:Button id="Button1" onclick="Button1_Click" runat="server" Text="OK"></asp:Button>
</p>
</form>
</body>
</html>
Enter the URL http://localhost/Welcome.aspx to execute the above program.
輸入http://localhost/Welcome.aspx執行上面的程式.
A server with the specific port will be started if you use Visual C # 2005 Express for executing the above program. You can locate the server on the TaskBar.
如果你使用Visual C # 2005 Express來運行上面的程式,伺服器將使用特殊的連接埠來運行程式.
In the above code, we have placed a textbox control and a button control. When the user clicks the button the text "Welcome to ASP.NET" will be displayed on the Textbox.
在上面的程式裡,我放置了一個文字框和一個按鈕.當使用者點擊按鈕文字框會顯示"Welcome to ASP.NET"。