The Plenty of data issue of ASP. NET TreeView)

Source: Internet
Author: User
In that scenario, I have some suggestions:
 
First, Please try to keep the node number of TreeView less than 1000, we can find that advice there:
 

Http://msdn.microsoft.com/en-us/library/ms529261.aspx
Rendering enormous hierarchical data sets in a single TreeView data island is not recommended. As a general rule, try to keep the number of nodes in a tree under 1000.
 
Each time an update is made to the UI of a TreeView control, for example, whenever a node is expanded or collapsed, additional data is appended to the view state, which maintains a history of state changes in the Web page. this means that each time a view is updated with a large data island, the amount of data appended to the view state history is increased. in ASP. NET, there is a limit in the size of the view state, so the combination of very large tree hierarchies combined with multiple updates may cause performance problems, and in certain cases portions of the history cocould be lost.

 
 
Second, If the rendered page is too large, I wowould like to suggest you try the ASP. NET 2.0 CSS Friendly Control Adapters, just like the following picture shows, it can optimize the rendering of the TreeView control:


 
 
Third, We can use AJAX to bind the Tree Node dynamically on demand; I think it can resolve the Plenty of data issue of TreeView:
 
 
There are some good article and samples about AJAX TreeView:
 
Building Tree View on demand using AJAX
Http://www.codeproject.com/KB/aspnet/TreeViewAjax.aspx
 
Ajax TreeView
Http://codeclimber.net.nz/archive/2007/06/28/Ajax-TreeView.aspx
 
Treeview AJAX Control sample page
Http://www.mathertel.de/AJAXEngine/S03_AJAXControls/TreeView.aspx
 
DHTML Tree View of Arbitrary Depth using AJAX
Http://www.codeproject.com/KB/aspnet/ajax_treeview.aspx
 
If I 've misunderstood the facing issue, please feel free to let me know.
 
Thanks.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.