海滨小城

.net研究

导航

treeview 相关的操作

 

在asp.net 中设计部分

<asp:TreeView ID="TreeView3" runat="server" Font-Size="XX-Large" Height="164px"

            ShowLines="True" Width="156px" DataSourceID="SiteMapDataSource1">

            <Nodes>

                <asp:TreeNode Text="站点导航" Value="根结点">

                    <asp:TreeNode Text="门户网站" Value="门户网站">

                        <asp:TreeNode Text="sohu网站" Value="sohu网站"></asp:TreeNode>

                        <asp:TreeNode Text="sina网站" Value="sina网站" NavigateUrl="http://www.sina.com"></asp:TreeNode>

                    </asp:TreeNode>

                    <asp:TreeNode Text="求职" Value="求职">

                        <asp:TreeNode Text="中华英才网" Value="中华英才网"></asp:TreeNode>

                        <asp:TreeNode Text="51job" Value="51job"></asp:TreeNode>

                        <asp:TreeNode Text="招聘" Value="招聘"></asp:TreeNode>

                    </asp:TreeNode>

                </asp:TreeNode>

            </Nodes>

</asp:TreeView>

在sitemap 中

 

  <siteMapNode title="站点导航">

    <siteMapNode url="http://www.baidu.com/" title="百度"  description="">

      <siteMapNode url="http://baike.baidu.com/" title="百科"  description="" />

      <siteMapNode url="http://zhidao.baidu.com/" title="知道"  description="" />

    </siteMapNode>

    <siteMapNode url="Default.aspx" title="新浪"  description="">

      <siteMapNode url="http://news.sina.com.cn/" title="新闻"  description="" />

      <siteMapNode url="http://tech.sina.com.cn/" title="科技"  description="" />

    </siteMapNode>

    <siteMapNode url="http://www.sogou.com/" title="搜狗"  description="">

      <siteMapNode url="http://news.sogou.com/" title="新闻"  description="" />

      <siteMapNode url="http://v.sogou.com/" title="视频"  description="" />

    </siteMapNode>

  </siteMapNode>


 

posted on 2010-09-01 17:15  海滨小城  阅读(148)  评论(0编辑  收藏  举报