Tailspin Spyworks指南第一讲:创建项目(一)

2014-11-24 01:25:20 · 作者: · 浏览: 0

Part 1: 文件-> 创建项目

By Joe Stagner|July 21, 2010 Translated By litdwg |March 12,2014 Print

Tailspin Spyworks demonstrates how extraordinarily simple it is to create powerful, scalable applications for the .NET platform. It shows off how to use the great new features in ASP.NET 4 to build an online store, including shopping, checkout, and administration.

通过Tailspin Spyworks 演示在.NET平台创建功能强大,结构良好的应用程序有多么简单。演示如何使用ASP.NET 4的新特性创建一个包含购物、结算和管理功能的在线网店。

This tutorial series details all of the steps taken to build the Tailspin Spyworks sample application. Part 1 covers Overview and File/New Project.

本系列指南对构建案例程序的每一步做了详细的解释。第一部分包括综述和创建新项目。

概述

This tutorial is an introduction to ASP.NET WebForms. We'll be starting slowly, so beginner level web development experience is okay.

The application we'll be building is a simple on-line store.

指南介绍ASP.NET WebForms,不需要太多web开发经验也能明白。

\



Visitors can browse Products by Category:

顾客可通过类别浏览商品:

\

They can view a single product and add it to their cart:

可浏览具体商品病添加到购物车:

\

They can review their cart, removing any items they no longer want:

可查看购物车,移除不想要的商品:

\

Proceeding to Checkout will prompt them to
执行结束将会把顾客引入此界面:

\

\

After ordering, they see a simple confirmation screen:

订购之后,顾客看到确认界面:

\

We"ll begin by creating a new ASP.NET WebForms project in Visual Studio 2010, and we'll incrementally add features to create a complete functioning application. Along the way, we'll cover database access, list and grid views, data update pages, data validation, using master pages for consistent page layout, AJAX, validation, user membership, and more.

首先创建VS 2010的项目,随后逐步添加功能完成一个完整的程序。此过程将包括数据库访问,list和gridview,数据更新页面,数据验证,使用master页面控制布局,AJAX,验证、用户管理等。

You can follow along step by step, or you can download the completed application fromhttp://tailspinspyworks.codeplex.com/

可跟随步骤完成,也可去http://tailspinspyworks.codeplex.com/下载完整的程序。

You can use either Visual Studio 2010 or the free Visual Web Developer 2010 fromhttp://www.microsoft.com/express/Web/. To build the application, you can use either SQL Server or the free SQL Server Express to host the database.

可使用VS2010或免费的VWD2010.数据库可使用SQL Server或免费的SQL Server Express

/ew Project

/ New Project

创建新项目

We'll start by selecting the New Project from the File menu in Visual Studio. This brings up the New Project dialog.

新建项目。

\

We’ll select the Visual C# / Web Templates group on the left, and then choose the “ASP.NET Web Application” template in the center column. Name your project TailspinSpyworks and press the OK button.

如下图选择、设置,然后点击OK按钮。

\

This will create our project. Let"s take a look at the folders that are included in our application in the Solution Explorer on the right side.

创建项目之后的界面效果。

\

The Empty Solution isn"t completely empty it adds a basic folder structure:

解决方案管理器中列出的程序基本结构:

\

Note the conventions implemented by the ASP.NET 4 default project template.

注意默认文件夹的功能。

  • The "Account" folder implements a basic user interface for ASP.NET's membership subsystem.
  • The "Scripts" folder serves as the repository for client side java script files and the core jQuery .js files are made available by default.
  • The "Styles" folder is used to organize our web site visuals (CSS Style Sheets)

    When we press F5 to run our application and render the default.aspx page we see the following.

    点击F5,运行效果如下:

    \

    Our first application enhancement will be to replace the Style.css file from the default WebForms template with the CSS classes and associated image file