你看看
http://www.chinabs.net
里面有关于这样的资料,可以的
http://www.chinabs.net
里面有关于这样的资料,可以的
解决方案 »
- 验证视图状态 MAC 失败????????按错误信息修改配置文件解决不了!!
- .net 如何实现服务端实时执行程序
- 请教magicajax的问题
- 怎么实现下拉框数据的动态筛选?
- 高手救命--关于数据为与TreeView控件生成无限级别的动态菜单问题!
- 一个调试时的错误,帮忙解决一下!
- 如何使用DropDownList控件实现连接的功能?
- Runtime Error 报错
- 请问:定制datagrid的分页,例如:前页,后页,首页,末页该怎样实现??
- 如何从数据库根据用户权限绑定左侧可展开/折叠的纵向菜单? -- ASP.NET网站开发
- 赶着交作业了。。就是看不懂程序。。。请写点注释。。。
- 怎么page_load不执行啊?(写在.aspx里的)
Public Sub InitNav()
If SelfAo Is Nothing Then
SelfAo = Session("SelfAo")
End If
If SelfAo.LoginStatus = False Then
Exit Sub
End If
Dim Cls As New CSQLGet()
Cls.StrCnn = SelfAo.DBInfo
Dim Rs As ADODB.Recordset
Rs = Cls.GetRs("Select * From BaseAoMenu Order by MID")
Cls = Nothing
Dim I As Long
Dim Node As Microsoft.Web.UI.WebControls.TreeNode
Dim Dict As Scripting.Dictionary
Dict = New Scripting.Dictionary()
Dict.CompareMode = Scripting.CompareMethod.TextCompare
With BaseTree
.Nodes.Clear()
For I = 1 To Rs.RecordCount
Dim StrRela As String, StrSelf As String
StrRela = vbNullString
StrSelf = CNulls(Rs("MID").Value, vbNullString)
If InStr(StrSelf, ".", CompareMethod.Text) <> 0 Then
StrRela = Left(Rs("MID").Value, InStrRev(Rs("MID").Value, ".") - 1)
End If
If StrRela = vbNullString Then
Node = New Microsoft.Web.UI.WebControls.TreeNode()
If CNulls(Rs("MMenuItemID").Value, vbNullString) <> vbNullString Then
Node.ID = CNulls(Rs("MMenuItemID").Value, vbNullString)
End If
Node.Expanded = True
Dim FilePath As String
FilePath = Server.MapPath("../images/Menu/")
If CNulls(Rs("MMenuItemID").Value, vbNullString) <> vbNullString Then
If File.Exists(FilePath & Rs("MMenuItemID").Value & ".gif") Then
Node.ImageUrl = "../images/Menu/" & Rs("MMenuItemID").Value & ".gif"
Else
Node.ImageUrl = "../images/Menu/MenuBack.gif"
End If
Else
Node.ImageUrl = "../images/Menu/MenuBack.gif"
End If
.Nodes.Add(Node)
Dict(StrSelf) = Node.GetNodeIndex
Else
Node = New Microsoft.Web.UI.WebControls.TreeNode()
If CNulls(Rs("MMenuItemID").Value, vbNullString) <> vbNullString Then
Node.ID = CNulls(Rs("MMenuItemID").Value, vbNullString)
End If
'Node.Expanded = True
Node.Text = CNulls(Rs("MLabel").Value, vbNullString)
Dim NodeParent As Microsoft.Web.UI.WebControls.TreeNode
NodeParent = BaseTree.GetNodeFromIndex(Dict(StrRela))
Node.ImageUrl = "../images/Menu/Next.gif"
Node.DefaultStyle.AppendCssText("font-family: 宋体, Arial;" & _
"font-size: 12px;" & _
"color: white;")
NodeParent.Nodes.Add(Node)
Dict(StrSelf) = Node.GetNodeIndex
NodeParent = Nothing
End If
Node = Nothing
Rs.MoveNext()
Next
End With
Dict = Nothing
Rs.Close() : Rs = Nothing
End Sub