Đang chuẩn bị liên kết để tải về tài liệu:
Professional ASP.NET 3.5 in C# and Visual Basic Part 76

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

Professional ASP.NET 3.5 in C# and Visual Basic Part 76. Building on the revolutionary ASP.NET 2.0 release, ASP.NET 3.5 adds several key new developer features including AJAX, LINQ, and a new CSS designer in Visual Web Developer 2008. The dramatic reduction in code that developers realized from the more than 50 new server controls in ASP.NET 2.0 now allows developers the time to make their applications more interactive with AJAX, to work with data in their preferred language with LINQ, and to build visually attractive and consistent standards-based sites with CSS. . | Chapter 14 Site Navigation Listing 14-28 Working with the CurrentNode object VB @ Page Language VB script runat server language vb Protected Sub Page_Load ByVal sender As Object ByVal e As System.EventArgs Labell.Text SiteMap.CurrentNode.Description br _ SiteMap.CurrentNode.HasChildNodes br _ SiteMap.CurrentNode.NextSibling.ToString br _ SiteMap.CurrentNode.ParentNode.ToString br _ SiteMap.CurrentNode.PreviousSibling.ToString br _ SiteMap.CurrentNode.RootNode.ToString br _ SiteMap.CurrentNode.Title br _ SiteMap.CurrentNode.Url End Sub script html xmlns http www.w3.org 1999 xhtml head runat server title SiteMapDataSource title head body form id form1 runat server asp Label ID Label1 runat server asp Label form body html C @ Page Language C script runat server protected void Page_Load object sender System.EventArgs e Labell.Text SiteMap.CurrentNode.Description br SiteMap.CurrentNode.HasChildNodes br SiteMap.CurrentNode.NextSibling.ToString br SiteMap.CurrentNode.ParentNode.ToString br SiteMap.CurrentNode.PreviousSibling.ToString br SiteMap.CurrentNode.RootNode.ToString br SiteMap.CurrentNode.Title br SiteMap.CurrentNode.Url script As you can see from this little bit of code by using the SiteMap class and the CurrentNode object you can work with a plethora of information regarding the current page. Running this page you get the following results printed to the screen The Latest Market Information True Funds Finance 707 Chapter 14 Site Navigation Quotes Home Markets SiteNavigation Markets.aspx Using the CurrentNode property you can actually create your own style of the SiteMapPath control as illustrated in Listing 14-29. Listing 14-29 Creating a custom navigation display using the CurrentNode property VB @ Page Language VB script runat server language vb Protected Sub Page_Load ByVal sender As Object ByVal e As System.EventArgs Hyperlinkl.Text SiteMap.CurrentNode.ParentNode.ToString Hyperlinkl.NavigateUrl SiteMap.CurrentNode.ParentNode.Url Hyperlink2.Text .

TÀI LIỆU LIÊN QUAN