What is wrong with the following code?
At the first look, it seems perfect but:
- N layered architecture
- Layers are: DAO –> Factory –> BL –>WebApp
And this code with the previous row:
In most cases loading large TreeView in one step can be a good performance killer. The generated html is really large and our page is loading so slow at the client and the average user don’t want to see the full tree together.
Let see, what needs for loading dynamically an asp.net server control on the server side.
We need a method that queries the list of the child nodes for a given node (DAO\CategoryDAO.cs):
Add a TreeView for the page (Default.aspx):
Make an AddChildNodes method for populate the child nodes of the given node (Default.aspx.cs):
Load the root elements on the first page load (Default.aspx.cs):
Create an event handler for the TreeNodePopulate event (Default.aspx.cs):
The full project is downloadable from my Skydrive public folder.
Happy and Bug free coding!