Click here to Skip to main content
15,867,453 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I have a treeview in masterpage.according to what node is selected, a variable pass to a page and based this variable ,the content of page is changed. but whit select of a node, the masterpage is reload and treeview shown in first state.
how do I disable aoutopostback of a treeview?
Posted
Comments
Nandakishore G N 22-Jul-14 9:58am    
What have you done till now? paste it

1 solution

We can set 'NavigateUrl' to value 'javascript:void(0)' to avoid the postback as below :-

ASP.NET
<asp:treenode text="Item 1.1" navigateurl="javascript:void(0)" xmlns:asp="#unknown"></asp:treenode>


But not sure if you are handling its click to pass the value for the variable to page, which also might be affected. In this case you can use to set value to hidden field and can use it.

Hope this will be of help to proceed further.
Please let me know if any further help you need on this.
 
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