简体   繁体   中英

Select ASP.NET treeView

I have only one question: I have ASP.NET TreeView control. Each node in the TreeView has a Tag property assigned. All i Want to do is to catch the NodeClicked event in JavaScript and display the TagProperty in the textbox. Is this possible?

Thank you,

You can add call to javascript function inside, treeview SelectedNodeChanged event handler. For instance:

protected void TreeView1_SelectedNodeChanged(object sender, EventArgs e){
  // Do whatever you're doing
  Node.Attributes.Add("OnClick","javaScriptName()");
}

Maybe, it's more easy to use the behind code (inside the event above) to change the textbox value.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM