Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I wanted to use callback on the click event of the tree node.


Please help.

Thanks in advance.
Posted

ASP.NET
<script type="text/javascript">
    function alertVal() {
        alert("Hai");
    }
</script>
<script runat="server">

    protected void Page_Load(object sender, EventArgs e)
    {
        TreeView1.Attributes.Add("onclick", "alertVal()");

    }
</script>
 
Share this answer
 
Comments
tarik shaikh 11-Apr-12 7:00am    
Hey thanks binson143. it worked.
Do you have any idea how to get the value of the clicked node in javascript.

I am creating the nodes dynamically.
binson143 13-Apr-12 0:42am    
Yes you can , you may have to use Jquery,then bind click event to the nodes
hi
following link will help u
http://forums.asp.net/p/1353925/2771697.aspx[^]
best Luck
happy Coding
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900