Do While myDataReader.Read
chklist.Items.Add(myDataReader( "funccname ").ToString())
chklist.Items(i).Value = myDataReader( "funcindex ").ToString & myDataReader( "funcname ").ToString
i = i + 1
Loop
myCount = 0
For i = 0 To chklist.Items.Count - 1
If InStr(Session( "rolekey "), Left(chklist.Items(i).Value, 4)) > 0 Then
Tree1.Nodes(myCount).Text = chklist.Items(i).Text
Tree1.Nodes(myCount).NavigateUrl = Trim(Mid$(chklist.Items(i).Value, 5))
myCount = myCount + 1
End If
Next i
Tree1.Nodes(Tree1.Nodes.Count - 1).NavigateUrl = "index.aspx "
If myCount > 0 Then : For i = myCount + 1 To Tree1.Nodes.Count - 1 : Tree1.Nodes.Remove(Tree1.Nodes(myCount)) : Next : End If
End If
End Sub
转为C#啊
小弟初学C#,望大侠见谅
------解决方案--------------------------------------------------------
有VB.NET到C#的代码转换工具
自己搜索一下!
------解决方案--------------------------------------------------------
先用vb.net编译
然后用Refelector反编译 获取C#代码 :)