When the treeview| client uses the TreeView control, the server will be burdened by the need to return to the server for the information needed to obtain the selection node.
If only to pick up the selection of the node information, in fact, there is no need to return to the server, the client can also.
. CS File:
TreeNode nodef = new TreeNode ();
Nodef.id = Drks[0]. ToString () + "\ onclick=\" Javascript:node_click (' +drks[0]. ToString () + "');"; The key is in the red section of the code.
Nodef.text = drks[1]. ToString ();
T_TJXMWH.NODES.ADD (NODEF);
The above code is actually adding the onclick event for each node, passing the required information as a parameter to the OnClick event handler function.
Client script:
<script language=javascript>
<!--
function Node_click (text)
{
Window.parent.frm_right.location.replace ("Atjxmwh_right.aspx?") Parameters= "+text);
}
-->
</SCRIPT>
Note: This article elaborated the method, perhaps some kind of alternative, this is my helpless lift. If there is a better way, please tell me, thank you.
e-mail:czhenq@yahoo.com.cn
qq:3671909