ASP.NET 3.5 for Dummies phần 6

Tham khảo tài liệu ' for dummies phần 6', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | 190 Part III Enhancing the Interface and User Experience Adding a Breadcrumb Feature to Your Pages A breadcrumb implemented through the SiteMapPath control displays the hierarchy as a single line of hyperlinks. Web designers usually place it near the top of the page. While the user navigates tracks the current location according to the filename and matches the filename with what it finds in the file. It can then look backward in the hierarchy to provide a trail to the starting point including the levels in between. If the breadcrumb doesn t show on a page make sure that the page s filename for example is somewhere in the file. If the filename s not there it can t be tracked and the SiteMapPath control won t have anything to display. Creating a breadcrumb on a master page This example puts the breadcrumb on a master page because it s far more convenient than repeatedly adding navigation controls to individual pages in a site. Follow these steps to add a breadcrumb to a master page 1. If you haven t already done so add a file to your project Filet New FiletSite Map and add data from Listing 11-2. 2. Add a master page to your project Filet New FiletMaster Page . 3. From the Navigation section in the Toolbox drag and drop a SiteMapPath control onto the master page. 4. Being sure to select the master page add an page named to your project. The filename is significant if you re using the sample data from Listing 11-2 because is part of that file. If you re using different data choose a filename that is included in your file. 5. Browse to . As shown in Figure 11-9 the browser displays the Home node as a hyperlink and the remaining nodes News and Local as text. Chapter 11 Adding Navigation with TreeView Menu Breadcrumb and SiteMap Figure 11-9 A bread crumb using the Site MapPath control. Customizing a breadcrumb You can customize several .

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
12    25    1    27-11-2024
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.