multisitemap_treeview.aspx

来自「《圣殿祭司的ASP.NET 2.0开发详解——使用C#》光盘内容.包含了书籍所含」· ASPX 代码 · 共 30 行

ASPX
30
字号
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="MultiSiteMap_TreeView.aspx.cs" Inherits="MultiSiteMap_TreeView" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>未命名页面</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:DropDownList ID="dwnProduct" runat="server" OnSelectedIndexChanged="dwnProduct_SelectedIndexChanged" AutoPostBack="True">
            <asp:ListItem Value="PC">PC电脑产品</asp:ListItem>
            <asp:ListItem Value="DC">DC数码相机</asp:ListItem>
            <asp:ListItem Value="NB">NB笔记本电脑</asp:ListItem>
        </asp:DropDownList><br />
        <asp:TreeView ID="TreeView1" runat="server" DataSourceID="SiteMapDataSource1" BorderColor="Black" BorderStyle="Dashed" BorderWidth="1px" ImageSet="XPFileExplorer" NodeIndent="15" Width="200px">
            <ParentNodeStyle Font-Bold="False" />
            <HoverNodeStyle Font-Underline="True" ForeColor="#6666AA" />
            <SelectedNodeStyle BackColor="#B5B5B5" Font-Underline="False" HorizontalPadding="0px"
                VerticalPadding="0px" />
            <NodeStyle Font-Names="Tahoma" Font-Size="8pt" ForeColor="Black" HorizontalPadding="2px"
                NodeSpacing="0px" VerticalPadding="2px" />
        </asp:TreeView>
        &nbsp;&nbsp;</div>
        <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" />
    </form>
</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?