Introducing ASP.NET 2.0 (ASP.NET 2.0 简介)

这是我第一次翻译作品,所以尚有很多不足之处还请各位多多指教,本文为工作空余时间所翻译,所以有些地方翻译得不够精确,没有专门查询专业字典,有的语句还没有翻译,所以望各位多多包涵,在以后的翻译中会不断提高,尽量地做得更好,因为第一次翻译肯定会有很多错误,所以连同英文一并贴出,望各位高手多多批评、指正。

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 2006530

译者:SPARON 2006530

In this article, the author examines the fundamentals of ASP.NET 2.0 with

在这篇文章里,作者研究了ASPNET 20的基本原理.

 

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"。

posted @ 2006-05-31 17:26  SPARON  阅读(2180)  评论(4编辑  收藏  举报