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:
{
using (SqlDataReader dr = ...)
!!!FAIL!!!
What is wrong with the following code?
At the first look, it seems perfect but:
And this code with the previous row:
!!!FAIL!!!
I have found this in the newsletter.
It is a free e-book about the query optimizer of Sql Server in 265 pages.
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.
The ProductCategory table contains the following records:
The value of ParentProductCategoryID is null at the root elements and the ProductCategoryID of the parent element at the others.
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!
Morzel