>>>后台go through you filenofor each yourfileno if (Request.Form[yourfileno] != null)
//checked
else
//not checked>>>但发觉到了前端捕获时都是true,无法变成FALSE??头痛啊try to put your code between
if (!IsPostBack)
{
//.....
}
//checked
else
//not checked>>>但发觉到了前端捕获时都是true,无法变成FALSE??头痛啊try to put your code between
if (!IsPostBack)
{
//.....
}
<%@ Import Namespace="Microsoft.Web.UI.WebControls" %>
<%@ Register TagPrefix="IE" Namespace="Microsoft.Web.UI.WebControls"
Assembly ="Microsoft.Web.UI.WebControls" %><Script runat="Server">Sub Page_Load
ShowChecked( treeIceCream.Nodes )
End SubSub ShowChecked( colNodes As TreeNodeCollection )
Dim tnNode As TreeNode For each tnNode in colNodes
If tnNode.Checked = True Then
lblCheckedNodes.Text &= "<li>" & tnNode.Text
End If
ShowChecked( tnNode.Nodes )
Next
End Sub</Script><html>
<head><title>TreeViewCheckbox.aspx</title></head>
<body>
<form runat="Server"><IE:TreeView
id="treeIceCream"
AutoPostBack="True"
Runat="Server"><TreeNode
Text="Ice Cream" > <TreeNode
CheckBox="True"
Text="Rocky Road"/>
<TreeNode
CheckBox="True"
Text="Chocolate"/>
<TreeNode
CheckBox="True"
Text="Strawberry"/>
<TreeNode
CheckBox="True"
Text="Vanilla"/></TreeNode></IE:TreeView><p>
<asp:Label
id="lblCheckedNodes"
EnableViewState="False"
Runat="Server" /></form>
</body>
</html>