在vs2010中,怎么实现选择treeview的一个节点时,不让其他节点已经展开的节点自动收缩起来
解决方案 »
- asp.net 我的textbox取到的是空值
- asp.net初学界面布局的疑惑一问,求各位大大帮忙
- B2C网站中,如何防止并发问题
- 急,sql语句出现问题!!
- asp.net中下拉框与文本框的问题////
- 在orcale中写了一个存储过程,通过一些组合得到一个Sqlstr(sql语句,为一个字符串),最后需要exectue sqlstr,返回一个数据集合;但提示
- DataKeyField 属性设置的问题(在线求助...)
- 请教几个有关 com,WebApp,WinApp的问题
- 关于目录树的控件:IEWebControls.exe,的一个问题。
- 如何在ASP.NET的DataGrid里显示主次关系的数据? 要求使用C#语言
- AJAX问题,求高手
- JS调用.net后台传调的数组问题
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>无标题页</title>
<script src="jquery-1.4.4.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
var treeId = '<%=this.TreeView1.ClientID %>';
$("#" + treeId + " a").each(function() {
$(this).removeAttr("href");
});
});
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TreeView ID="TreeView1" runat="server" DataSourceID="XmlDataSource1">
</asp:TreeView>
<asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile="~/XMLFile.xml"></asp:XmlDataSource>
</div>
</form>
<%--下面是XMLFile.xml数据
<?xml version="1.0" encoding="ISO-8859-1"?>
<bookstore>
<book id="No1">
<title>An Introduction to XML</title>
<author>Chunbin</author>
<year>2010</year>
<price>98.0</price>
</book>
<book id="No2">
<title>The Performance of DataBase</title>
<author>John</author>
<year>1996</year>
<price>56.0</price>
</book>
</bookstore>--%>
</body>
</html>