What would be the advisable thing to do to maximize the performance while using TreeView?
By maximize the performance, i mean minimize the number of trips between client to server, ie postbacks.
I am talking about ASP.net TreeView server control
On the oher side, RAD tool like VS and TreeView control offers quick production of web application, but of course with some penalties: you need to go back to server to handle every click/select event, which draws issues with whole page life cycle processing and huge amount of data transfer for ajax calls (ViewState along with HTML are transferred from server to client for every ajax event).
But if you want to stick with TreeView, i recommend:
- CSS Friendly Control Adapter: they greatly reduce size of generated html (in my case, from 100kb to 20kb of html) and replace table layout with ul/li elements
- Wrap TreeView inside ASP.NET AJAX UpdatePanel, but just treeview, and use conditional updates of panel. Don't be afraid to use several updatepanels
- keep ViewState minimal