How can I remove nodes from a SiteMapNodeCollection?

前端 未结 3 1497
清歌不尽
清歌不尽 2021-01-24 09:14

I\'ve got a Repeater that lists all the web.sitemap child pages on an ASP.NET page. Its DataSource is a SiteMapNodeCollection. But, I do

3条回答
  •  不思量自难忘°
    2021-01-24 09:52

    Your shouldn't need CType

    Dim children = _
        From n In SiteMap.CurrentNode.ChildNodes.Cast(Of SiteMapNode)() _
        Where n.Url <> "/Registration.aspx" _
        Select n
    

提交回复
热议问题