I have my treenode populated with data from database.The treeview code is as follows:
<asp:TreeView ID="mytv" runat="server" ImageSet="Arrows"
ondatabinding="Page_Load" onselectednodechanged="mytv_SelectedNodeChanged">
And the code-behind for this is as follows:
protected void mytv_SelectedNodeChanged(object sender, EventArgs e)
{
// how to call java-script function from here.
}
What I am trying to achieve is to display the content of div as per the tree-node clicked using JavaScript.
Or is there any other way to display the content from database or from div on clicking the treeview node.
Use this one inside the method:
ScriptManager.RegisterStartupScript(this, this.GetType(),
"anyName", "alert('test');", true);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With