To do this, all you have to do is set the NavigateUrl attribute to "javascript:void(0)" of the TreeNodeBinding.
<asp:TreeNodeBinding DataMember="item" Depth="1" NavigateUrl="javascript:void(0)" ValueField="name" />
Note that this only disable the postback in 2nd level of nodes as what i have set in the Depth attribute.
Works on IE and Firefox.
Attached here is the sample code.
Download Sample (8.39 kb)
6 comments:
tons of thanks, saved my day...
dude this saved my bacon! TWO YEARS LATER!! thanks!
thank you thank you thank you thank you thank you thank you!!!!
<3 you for this!
thanks a lot
or just "#"
Thanks, this helped me even after 6 years =)
Post a Comment