ASP.NET 2.0 Data Tutorials
来源:互联网 发布:电影票比价软件哪个好 编辑:程序博客网 时间:2024/05/22 11:44
Building and using a 3-tiered data architecture with ASP.NET 2.0
Welcome to a series of tutorials that will explore techniques for implementing these common data access patterns in ASP.NET 2.0. These tutorials are geared to be concise and provide step-by-step instructions with plenty of screen shots to walk you through the process visually. Each tutorial is available in C# and Visual Basic versions and includes a download of the complete code used.
Introduction | Basic Reporting | Master/Detail | Custom Formatting
Introduction
Creating a Data Access Layer
In this tutorial we'll start from the very beginning and create the Data Access Layer (DAL), using typed DataSets, to access the information in a database.
View this tutorial: Visual Basic | Visual C#
Download the code: Visual Basic | Visual C#
Creating a Business Logic Layer
In this tutorial we'll see how to centralize your business rules into a Business Logic Layer (BLL) that serves as an intermediary for data exchange between the presentation layer and the DAL.
View this tutorial: Visual Basic | Visual C#
Download the code: Visual Basic | Visual C#
Master Pages and Site Navigation
One common characteristic of user-friendly websites is that they have a consistent, site-wide page layout and navigation scheme. This tutorial looks at how you can create a consistent look and feel across all pages that can easily be updated.
View this tutorial: Visual Basic | Visual C#
Download the code: Visual Basic | Visual C#
Basic Reporting
Displaying Data With the ObjectDataSource
This tutorial looks at the ObjectDataSource control Using this control you can bind data retrieved from the BLL created in the previous tutorial without having to write a line of code!
View this tutorial: Visual Basic | Visual C#
Download the code: Visual Basic | Visual C#
Declarative Parameters
In this tutorial we'll illustrate how to use a parameter set to a hard-coded value to select the data to display in a DetailsView control.
View this tutorial: Visual Basic | Visual C#
Download the code: Visual Basic | Visual C#
Programmatically Setting the ObjectDataSource's Parameter Values
In this tutorial we'll look at adding a method to our DAL and BLL that accepts a single input parameter and returns data. The example will set this parameter programmatically.
View this tutorial: Visual Basic | Visual C#
Download the code: Visual Basic | Visual C#
Master/Detail Reporting
Master/Detail Filtering With a DropDownList
In this tutorial we'll see how to display the master records in a DropDownList control and the details of the selected list item in a GridView.
View this tutorial: Visual Basic | Visual C#
Download the code: Visual Basic | Visual C#
Master/Detail Filtering With Two DropDownLists
This tutorial expands the master/detail relationship to add a third layer, using two DropDownList controls to select the desired parent and grandparent records.
View this tutorial: Visual Basic | Visual C#
Download the code: Visual Basic | Visual C#
Master/Detail Filtering Across Two Pages
In this tutorial we'll implement this pattern by using a GridView to list the suppliers in the database. Each supplier row in the GridView will contain a View Products link that, when clicked, will take the user to a separate page that lists those products for the selected supplier.
View this tutorial: Visual Basic | Visual C#
Download the code: Visual Basic | Visual C#
Master/Detail Using a Selectable Master GridView with a Details DetailView
This tutorial will have a GridView whose rows include the name and price of each product along with a Select button. Clicking the Select button for a particular product will cause its full details to be displayed in a DetailsView control on the same page.
View this tutorial: Visual Basic | Visual C#
Download the code: Visual Basic | Visual C#
Custom Formatting
Custom Formatting Based Upon Data
Adjusting the format of the GridView, DetailsView, or FormView based upon the data bound to it can be accomplished in multiple ways. In this tutorial we'll look at how to accomplish data bound formatting through the use of the DataBound and RowDataBound event handlers.
View this tutorial: Visual Basic | Visual C#
Download the code: Visual Basic | Visual C#
Using TemplateFields in the GridView Control
To provide flexibility, the GridView offers the TemplateField, which renders using a template. A template can include a mix of static HTML, Web controls, and databinding syntax. In this tutorial we'll examine how to use the TemplateField to achieve a greater degree of customization with the GridView control.
View this tutorial: Visual Basic | Visual C#
Download the code: Visual Basic | Visual C#
Using TemplateFields in the DetailsView Control
The same TemplateFields capabilities available with the GridView are also available with the DetailsView control. In this tutorial we'll display one product at a time using a DetailsView containing TemplateFields.
View this tutorial: Visual Basic | Visual C#
Download the code: Visual Basic | Visual C#
Using the FormView's Templates
Unlike the DetailsView, the FormView is not composed of fields. Instead, the FormView is rendered using templates. In this tutorial we'll examine using the FormView control to present a less rigid display of data.
View this tutorial: Visual Basic | Visual C#
Download the code: Visual Basic | Visual C#
Displaying Summary Information in the GridView's Footer
Summary information is often displayed at the bottom of the report in a summary row. The GridView control can include a footer row into whose cells we can programmatically inject aggregate data. In this tutorial we'll see how to display aggregate data in this footer row.
View this tutorial: Visual Basic | Visual C#
Download the code: Visual Basic | Visual C#
- ASP.NET 2.0 Data Tutorials
- ASP.NET 2.0 Security, Membership and Roles Tutorials
- Statistical Data Mining Tutorials
- ASP.NET MVC Sample Applications - Open-Source Examples and Tutorials
- asp.net core1.0 tutorials and new features
- Binding Data With TreeView Control ASP.NET 2.0
- Display Hierarchical Data with TreeView in ASP.NET 2.0
- Simplified and Extended Data Binding Syntax in ASP.NET 2.0
- Security Tutorials系列文章第一章:Security Basics and ASP.NET Support
- ASP.NET Tip: Exporting Data to Excel
- ASP.Net Data Web Controls Kick Start
- ASP.NET Data Presentation Controls Essentials
- ASP.NET数据库连接池Data Connection Framework
- WHAT IS ASP.NET DYNAMIC DATA?
- ASP.NET Dynamic Data (动态数据)
- [Asp.net]引用System.Data.OraclieClient.dll
- Data Service - 8. ASP.NET AJAX Sys.Data
- Declarative Parameters(Data Access Tutorials 5)
- 如果爱,请别用眼泪感动爱情
- 2006年7月6日 工作日记
- 今天看书用ASP.NET做了个聊天室!
- 取得資料表欄位說明
- C语言测试:想成为嵌入式程序员应知道的0x10个基本问题
- ASP.NET 2.0 Data Tutorials
- 伤离别!
- 一般报java.lang.NullPointerException的原因有以下几种
- 深入浅出话多态(上)——具体而微
- 这二李VS那二李,青梅煮好酒,都是真英雄!
- 一般报java.lang.NullPointerException的原因有以下几种
- shell 总结
- 初次接触linux 总结:
- 深入浅出话多态(下)——牛刀小试