<form id="Form1" method="post" runat="server">
<iewc:treeview id="TreeView1" style="Z-INDEX: 101; LEFT: 176px; POSITION: absolute; TOP: 32px"
runat="server" TreeNodeSrc="tree3.xml"></iewc:treeview><asp:textbox id="TextBox1" style="Z-INDEX: 102; LEFT: 176px; POSITION: absolute; TOP: 144px"
runat="server" TextMode="MultiLine" Width="328px" Height="192px"></asp:textbox></form> Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
loadXML()
End Sub
Sub loadXML()
Dim xdoc As New XmlDocument
xdoc.Load(Server.MapPath("") + "\" + "aspnetbooks.xml")
Dim xnode As XmlNode
'xnode = xdoc.SelectSingleNode("root/MD5/ClientID[text()='00000001']")
Dim xnl As XmlNodeList
xnl = xdoc.SelectNodes("books/book/@price")
For Each xnode In xnl
TextBox1.Text = TextBox1.Text + " " + xnode.InnerText
Next
'TextBox1.Text = xnode.Name End Sub
<iewc:treeview id="TreeView1" style="Z-INDEX: 101; LEFT: 176px; POSITION: absolute; TOP: 32px"
runat="server" TreeNodeSrc="tree3.xml"></iewc:treeview><asp:textbox id="TextBox1" style="Z-INDEX: 102; LEFT: 176px; POSITION: absolute; TOP: 144px"
runat="server" TextMode="MultiLine" Width="328px" Height="192px"></asp:textbox></form> Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
loadXML()
End Sub
Sub loadXML()
Dim xdoc As New XmlDocument
xdoc.Load(Server.MapPath("") + "\" + "aspnetbooks.xml")
Dim xnode As XmlNode
'xnode = xdoc.SelectSingleNode("root/MD5/ClientID[text()='00000001']")
Dim xnl As XmlNodeList
xnl = xdoc.SelectNodes("books/book/@price")
For Each xnode In xnl
TextBox1.Text = TextBox1.Text + " " + xnode.InnerText
Next
'TextBox1.Text = xnode.Name End Sub
解决方案 »
- 求文本框只能输入1-100之间数字的正则,和只能输入邮箱格式的正则?
- xml反序列化,请高人帮忙啊
- asp.net做bbs时的按钮一个很奇怪的问题
- 使用ASP.NET 2.0的母版功能的时候,母版上的表格背景如何在调用母版页面显示出来啊? 各位大哥帮帮忙哦!!
- 机器名\ASPNET' 登录失败(在asp.net2.0里)
- msrdp.ocx(win远程桌面控件)的注册问题(已经郁闷几天了,请各位大虾帮帮忙!看看吧)
- 一个小问题 控件的
- winform的combobox问题
- 一个关于dropdownlist的郁闷问题。
- Excel输出中 如何设置 1.单元格自动换行,2.每列自动调整列宽
- 为什么我的下载程序只能下载小文件,大的就不行了?
- 菜鸟的问题:关于ACCESS数据库的不可更新查询
<TREENODES>
<treenode text="Teach Yourself Active Server Pages 3.0 in 21 Days">
<treenode text="Price $34.95" />
</treenode>
<treenode text="Authors">
<treenode text="Mitchell" />
<treenode text="Atkinson" />
</treenode>
</TREENODES>Tree3.XML
你的例子是一次性加载tree3.xml ,能否有点击节点的时候再加载它的下一层节点的XML
但是能否有类似于资源管理器的界面,有连接线
http://msdn.microsoft.com/workshop/webcontrols/behaviors/library/treeview/treeview.asphttp://dev.csdn.net/article/28/28499.shtm
http://dev.csdn.net/article/28/28502.shtmhttp://aspnet.4guysfromrolla.com/articles/051403-1.aspx