本文整理汇总了VB.NET中System.Web.SiteMapNodeCollection.SiteMapNodeCollection构造函数的典型用法代码示例。如果您正苦于以下问题:VB.NET SiteMapNodeCollection构造函数的具体用法?VB.NET SiteMapNodeCollection怎么用?VB.NET SiteMapNodeCollection使用的例子?那么恭喜您, 这里精选的构造函数代码示例或许可以为您提供帮助。您也可以进一步了解该构造函数所在类System.Web.SiteMapNodeCollection 的用法示例。
在下文中一共展示了SiteMapNodeCollection构造函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的VB.NET代码示例。
示例1: LoadSiteMapData
' The LoadSiteMapData() Function loads site navigation
' data from persistent storage into a DataTable.
Dim siteMapData As DataTable
siteMapData = LoadSiteMapData()
' Create a SiteMapNodeCollection.
Dim nodes As New SiteMapNodeCollection()
' Create a SiteMapNode and add it to the collection.
Dim tempNode As SiteMapNode
Dim row As DataRow
Dim index As Integer
index = 0
While (index < siteMapData.Rows.Count)
row = siteMapData.Rows(index)
' Create a node based on the data in the DataRow.
tempNode = New SiteMapNode(SiteMap.Provider, row("Key").ToString(), row("Url").ToString())
' Add the node to the collection.
nodes.Add(tempNode)
index = index + 1
End While
开发者ID:VB.NET开发者,项目名称:System.Web,代码行数:26,代码来源:SiteMapNodeCollection
示例2: SiteMapNodeCollection
' Create a SiteMapNodeCollection with all the nodes
' from the first two hierarchical levels of the current
' site map.
Dim baseCollection As SiteMapNodeCollection
baseCollection = New SiteMapNodeCollection(SiteMap.RootNode)
Dim childCollection As SiteMapNodeCollection = SiteMap.RootNode.ChildNodes
baseCollection.AddRange(childCollection)
Response.Write( "<BR>Derived SiteMapNodeCollection.<BR><HR><BR>")
For Each node In baseCollection
Response.Write( node.Title + "<BR>")
Next
开发者ID:VB.NET开发者,项目名称:System.Web,代码行数:15,代码来源:SiteMapNodeCollection
示例3: SiteMapNodeCollection
Dim siteNodes As SiteMapNodeCollection
siteNodes = SiteMap.RootNode.GetAllNodes()
If siteNodes.IsReadOnly Or siteNodes.IsFixedSize Then
Response.Write("Collection is read-only or has fixed size.<BR>")
' Create a new, modifiable collection from the existing one.
Dim modifiableCollection As SiteMapNodeCollection
modifiableCollection = New SiteMapNodeCollection(siteNodes)
' The MoveNode example method moves a node from position one to
' the last position in the collection.
MoveNode(modifiableCollection)
Else
MoveNode(siteNodes)
End If
开发者ID:VB.NET开发者,项目名称:System.Web,代码行数:17,代码来源:SiteMapNodeCollection
注:本文中的System.Web.SiteMapNodeCollection.SiteMapNodeCollection构造函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论