APNSoft.com - Web Controls, components for ASP.NET
 About Us 

ASP.NET Controls

ASP.NET ComboBox
The professional replacement for the classic ASP.NET DropDownList component.

ASP.NET DataGrid
The server control to display data in a tabular format with options of choice, sorting and editing entries.

ASP.NET Include
The server control to include a HTML files into your ASP.NET pages as Server Side Includes (SSI).

The server control to display both statically and dynamically created menus on your Web pages.

ASP.NET Rating
The server control to easily provide feedback on an article, blog item, product description, etc.

ASP.NET TreeView
The ASP.NET server control to display hierarchical data in a tree structure.

How to reduce the amount of code that is generated by the TreeView?

Our goal has been to keep the size of the generated code at a minimum for the sake of a fast Internet communication. As a result of our efforts, the average code size including the scripts, HTML, cascading style sheets, etc. related to the APNSoft TreeView is in the range of 10-15K only.

But here are our recommendations how to reduce the result code.

TreeView uses a new AJAX-based feature, which allows you to load child nodes on demand without PostBack to the server. TreeView automatically checks loaded data in order to avoid extra requests. Set the LoadOnDemand property value to True to enable this feature.

Short IDs
Use short IDs for component instance and items. ID is used as the prefix for naming all of HTML and JavaScript parts in order to ensure uniqueness. Using a short ID (for example "cu", "gb", etc. instead of "Contact_Us", "Guest_Book") will decrease the overall amount of rendered markup.

External CSS
By default, control takes CSS Style from the Skin Folder, adds unique prefix to classes and spits out complete style code into the page. You can add this CSS Style to the page by using the <link> element inside the <head> section. The browser will use the cached version of the CSS file, saving you about 10 kb per request. Do the following:
  • Add the instruction in the section of your web page:

    <link rel="stylesheet" href="~/TreeView/Skins/Classic/Style.CSS" type="text/css" />
  • Set the CSSSource property value to Page.
  • Set the CSSClassesPrefix property (specifies a prefix for CSS Style classes) and add prefix to CSS classes:

    <APNSoft:APNSoftTreeView id="myTreeView" runat="server"

 Search Options:
Topic:    Search for:

APNSoft FAQ Manager 1.0 (38)   ©¬†2003-2024 APNSoft. All rights reserved.

© 2003-2024 APNSoft. All rights reserved.    Terms of use.