APNSoft - Web Controls, components for ASP.NET Home Help Center Contact Us
About UsProductsDownloadsPurchase
Support
Our Products

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

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

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

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

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




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

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 Menu is in the range of 15-20K only.

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

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

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 "m1") will decrease the overall amount of rendered markup.

Also, you should use external .JS file with the client-side script. The browser will use the cached version of the .JS file, saving you about 25 kb per request. In this case:
  1. Take the Menu.js file from the Downloads section and put it into the folder "Scripts" that is created in the root of your web application.
  2. Set the ClientScriptSource property value to ExternalFile.
  3. Add the instruction in the <head> section of your web page:

    <script type="text/javascript" src="./Scripts/Menu.js"></script>

Also, it is recommended to use a CSS Style by the <link> element inside the <head> section:
  1. Take any CSS Style file (for example "CSSStyleHorizontal.CSS") from the Skins Library and put it into the folder "Styles", that is created in the folder where an ASPX page with menu is located.
  2. Set the CSSSource property value to Page.
  3. Add the instruction in the section of your web page:

    <link rel="stylesheet" href="./Styles/CSSStyleHorizontal.CSS" type="text/css" />

In addition, use short values for the CSSClassesPrefix property.


 Search Options:
Topic:    Search for:
  Match:

APNSoft FAQ Manager 1.0 (30)   © 2003-2010 APNSoft. All rights reserved.
  © 2003-2010 APNSoft. All rights reserved. Terms of use  Contact Us