Branislav B.
Branislav B.

Reputation: 558

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,

Upvotes: 1

Views: 308

Answers (1)

arthur86
arthur86

Reputation: 531

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.

Upvotes: 1

Related Questions