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