Scott Mitchell's ASP. NET 2.0 data tutorial 9: Cross-page Master/Slave report

Source: Internet
Author: User

Original English version | code | English PDF version Introduction

In the previous two tutorials, we saw how to display the Master/Slave report on a single page. It uses DropDownList to display the master record, and uses GridView or DetailsView to display details. another common Master/Slave report mode is to display the master record on one page while displaying details on another page. forums on the Internet, such as www.asp.net, are very typical examples of this mode in practical applications. asp. net forums are composed of multiple sub-forums: Getting Started, Web Forms, Data Presentation Controls, and so on. each sub-Forum contains multiple topics, and each topic is composed of multiple posts. these sub-forums are listed on the asp.net Forum homepage. clicking a forum will go to ShowForum. the aspx page that lists topics contained in this subforum. similarly, clicking a topic changes to ShowPost. aspx. The page displays the posts of the clicked topic.

In this tutorial, we will use the GridView to list suppliers to implement this mode. each row (one row is a supplier) in the GridView contains a "view product" link. this link will go to another page when you click it. This page displays all the products of the selected supplier.

Step 1: Add SupplierListMaster. aspx and ProductsForSupplierDetails. aspx to the Filtering folder.

When defining the Page Structure in the third tutorial, we added several start pages in the BasicReporting, Filtering, and CustomFormatting folders. we have not added the start page for this tutorial, and added two pages in the Filtering Folder: SupplierListMaster. aspx and ProductsForSupplierDetails. aspx. supplierListMaster. aspx will list the primary record (supplier) ProductsForSupplierDetails. aspx will display the products of the selected supplier.

When creating these two pages, be sure to associate them with the Site. master page.


Figure 1: Add SupplierListMaster. aspx and ProductsForSupplierDetails. aspx In the Filtering folder

After adding two files to the project, make sure that the website map file Web. sitemap is updated accordingly. For this tutorial, simply use the following XML content Child node of the element

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.