12/19/08

SQL SERVER - Delete Duplicate Records - Rows

Following code is useful to delete duplicate records. The table must have identity column, which will be used to identify the duplicate records. Table in example is has ID as Identity Column and Columns which have duplicate data are DuplicateValueColumn1, DuplicateValueColumn2 and DuplicateValueColumn3.

DELETE
FROM MyTable
WHERE ID NOT IN
(
SELECT MAX(ID)
FROM MyTable
GROUP BY DuplicatevalueColumn1, DuplicateValueColumn2,
DuplicateValueColumn2)



EXAMPLE
----------



if there is no key in the table then what ?

I have on table named [Duplicate] {ID int,FNAME varchar(10),MNAME varchar(10)}

Here there is no key and here are duplicate rows. so hoca can i delete this duplicate rows.

Check Data

ID FNAME LNAME
1 AAA CCC
2 BBB DDD
1 AAA CCC
2 BBB DDD
1 AAA CCC
2 BBB DDD
3 BCB DGD

Remove duplicate rows and keep the data in to the table like this using single query.

ID FNAME LNAME
1 AAA CCC
2 BBB DDD
3 BCB DGD

12/16/08

Asp.Net 2.0 Page Directives

Asp.Net Page directives are something that is a part of every asp.net pages. Page directives are instructions, inserted at the top of an ASP.NET page, to control the behavior of the asp.net pages. So it is type of mixed settings related to how a page should render and processed.

Here’s an example of the page directive.,
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Sample.aspx.cs" Inherits="Sample" Title="Sample Page Title" %>

Totally there are 11 types of Pages directives in Asp.Net 2.0. Some directives are very important without which we cannot develop any web applications in Asp.Net. Some directives are used occasionally according to its necessity. When used, directives can be located anywhere in an .aspx or .ascx file, though standard practice is to include them at the beginning of the file. Each directive can contain one or more attributes (paired with values) that are specific to that directive.


Asp.Net web form page framework supports the following directives

1. @Page
2. @Master
3. @Control
4. @Register
5. @Reference
6. @PreviousPageType
7. @OutputCache
8. @Import
9. @Implements
10. @Assembly
11. @MasterType


@Page Directive

The @Page directive enables you to specify attributes and values for an Asp.Net Page to be used when the page is parsed and compiled. Every .aspx files should include this @Page directive to execute. There are many attributes belong to this directive. We shall discuss some of the important attributes here.

a. AspCompat: When set to True, this allows to the page to be executed on a single-threaded apartment. If you want to use a component developed in VB 6.0, you can set this value to True. But setting this attribute to true can cause your page's performance to degrade.

b. Language: This attribute tells the compiler about the language being used in the code-behind. Values can represent any .NET-supported language, including Visual Basic, C#, or JScript .NET.

c. AutoEventWireup: For every page there is an automatic way to bind the events to methods in the same .aspx file or in code behind. The default value is true.

d. CodeFile: Specifies the code-behid file with which the page is associated.

e. Title: To set the page title other than what is specified in the master page.

f. Culture: Specifies the culture setting of the page. If you set to auto, enables the page to automatically detect the culture required for the page.

g. UICulture: Specifies the UI culture setting to use for the page. Supports any valid UI culture value.

h. ValidateRequest: Indicates whether request validation should occur. If set to true, request validation checks all input data against a hard-coded list of potentially dangerous values. If a match occurs, an HttpRequestValidationException Class is thrown. The default is true. This feature is enabled in the machine configuration file (Machine.config). You can disable it in your application configuration file (Web.config) or on the page by setting this attribute to false.

i. Theme: To specify the theme for the page. This is a new feature available in Asp.Net 2.0.

j. SmartNavigation: Indicates the smart navigation feature of the page. When set to True, this returns the postback to current position of the page. The default value is false.

k. MasterPageFile: Specify the location of the MasterPage file to be used with the current Asp.Net page.

l. EnableViewState: Indicates whether view state is maintained across page requests. true if view state is maintained; otherwise, false. The default is true.

m. ErrorPage: Specifies a target URL for redirection if an unhandled page exception occurs.

n. Inherits: Specifies a code-behind class for the page to inherit. This can be any class derived from the Page class.

There are also other attributes which are of seldom use such as Buffer, CodePage, ClassName, EnableSessionState, Debug, Description, EnableTheming, EnableViewStateMac, TraceMode, WarningLevel, etc. Here is an example of how a @Page directive looks

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Sample.aspx.cs" Inherits="Sample" Title="Sample Page Title" %>


@Master Directive

The @Master directive is quite similar to the @Page directive. The @Master directive belongs to Master Pages that is .master files. The master page will be used in conjunction of any number of content pages. So the content pages can the inherits the attributes of the master page. Even though, both @Page and @Master page directives are similar, the @Master directive has only fewer attributes as follows

a. Language: This attribute tells the compiler about the language being used in the code-behind. Values can represent any .NET-supported language, including Visual Basic, C#, or JScript .NET.

b. AutoEventWireup: For every page there is an automatic way to bind the events to methods in the same master file or in code behind. The default value is True.

c. CodeFile: Specifies the code-behid file with which the MasterPage is associated.

d. Title: Set the MasterPage Title.

e. MasterPageFile: Specifies the location of the MasterPage file to be used with the current MasterPage. This is called as Nested Master Page.

f. EnableViewState: Indicates whether view state is maintained across page requests. true if view state is maintained; otherwise, false. The default is true.

g. Inherits: Specifies a code-behind class for the page to inherit. This can be any class derived from the Page class.

Here is an example of how a @Master directive looks

<%@ Master Language="C#" AutoEventWireup="true" CodeFile="WebMaster.master.cs" Inherits="WebMaster" %>

@Control Directive

The @Control directive is used when we build an Asp.Net user controls. The @Control directive helps us to define the properties to be inherited by the user control. These values are assigned to the user control as the page is parsed and compiled. The attributes of @Control directives are

a. Language: This attribute tells the compiler about the language being used in the code-behind. Values can represent any .NET-supported language, including Visual Basic, C#, or JScript .NET.

b. AutoEventWireup: For every page there is an automatic way to bind the events to methods in the same .ascx file or in code behind. The default value is true.

c. CodeFile: Specifies the code-behid file with which the user control is associated.

d. EnableViewState: Indicates whether view state is maintained across page requests. true if view state is maintained; otherwise, false. The default is true.

e. Inherits: Specifies a code-behind class for the page to inherit. This can be any class derived from the Page class.

f. Debug: Indicates whether the page should be compiled with debug symbols.

g. Src: Points to the source file of the class used for the code behind of the user control.

The other attributes which are very rarely used is ClassName, CompilerOptions, ComplieWith, Description, EnableTheming, Explicit, LinePragmas, Strict and WarningLevel.

Here is an example of how a @Control directive looks

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="MyControl.ascx.cs" Inherits=" MyControl " %>

@Register Directive

The @Register directive associates aliases with namespaces and class names for notation in custom server control syntax. When you drag and drop a user control onto your .aspx pages, the Visual Studio 2005 automatically creates an @Register directive at the top of the page. This register the user control on the page so that the control can be accessed on the .aspx page by a specific name.

The main atttribues of @Register directive are
a. Assembly: The assembly you are associatin with the TagPrefix.

b. Namespace: The namspace to relate with TagPrefix.

c. Src: The location of the user control.

d. TagName: The alias to relate to the class name.

e. TagPrefix: The alias to relate to the namespace.

Here is an example of how a @Register directive looks

<%@ Register Src="Yourusercontrol.ascx" TagName=" Yourusercontrol " TagPrefix="uc1" Src="~\usercontrol\usercontrol1.ascx" %>


@Reference Directive

The @Reference directive declares that another asp.net page or user control should be complied along with the current page or user control. The 2 attributes for @Reference direcive are

a. Control: User control that ASP.NET should dynamically compile and link to the current page at run time.

b. Page: The Web Forms page that ASP.NET should dynamically compile and link to the current page at run time.

c. VirutalPath: Specifies the location of the page or user control from which the active page will be referenced.

Here is an example of how a @Reference directive looks

<%@ Reference VirutalPath="YourReferencePage.ascx" %>


@PreviousPageType Directive

The @PreviousPageType is a new directive makes excellence in asp.net 2.0 pages. The concept of cross-page posting between Asp.Net pages is achieved by this directive. This directive is used to specify the page from which the cross-page posting initiates. This simple directive contains only two attibutes

a. TagName: Sets the name of the derived class from which the postback will occur.

b. VirutalPath: sets the location of the posting page from which the postback will occur.

Here is an example of @PreviousPageType directive


<%@ PreviousPageType VirtualPath="~/YourPreviousPageName.aspx" %>

@OutputCache Directive

The @OutputCache directive controls the output caching policies of the Asp.Net page or user control. You can even cache programmatically through code by using Visual Basic .NET or Visual C# .NET. The very important attributes for the @OutputCache directive are as follows

Duration: The duration of time in seconds that the page or user control is cached.

Location: To specify the location to store the output cache. To store the output cache on the browser client where the request originated set the value as ‘Client’. To store the output cache on any HTTP 1.1 cache-capable devices including the proxy servers and the client that made request, specify the Location as Downstream. To store the output cache on the Web server, mention the location as Server.

VaryByParam: List of strings used to vary the output cache, separated with semi-colon.

VaryByControl: List of strings used to vary the output cache of a user Control, separated with semi-colon.

VaryByCustom: String of values, specifies the custom output caching requirements.

VaryByHeader: List of HTTP headers used to vary the output cache, separated with semi-colon.

The other attribues which is rarely used are CacheProfile, DiskCacheable, NoStore, SqlDependency, etc.


<%@ OutputCache Duration="60" Location="Server" VaryByParam="None" %>


To turn off the output cache for an ASP.NET Web page at the client location and at the proxy location, set the Location attribute value to none, and then set the VaryByParam value to none in the @ OutputCache directive. Use the following code samples to turn off client and proxy caching.

<%@ OutputCache Location="None" VaryByParam="None" %>

@Import Directive

The @Import directive allows you to specify any namespaces to the imported to the Asp.Net pages or user controls. By importing, all the classes and interfaces of the namespace are made available to the page or user control. The example of the @Import directive

<%@ Import namespace=”System.Data” %>
<%@ Import namespace=”System.Data.SqlClient” %>


@Implements Directive

The @Implements directive gets the Asp.Net page to implement a specified .NET framework interface. The only single attribute is Interface, helps to specify the .NET Framework interface. When the Asp.Net page or user control implements an interface, it has direct access to all its events, methods and properties.


<%@ Implements Interface=”System.Web.UI.IValidator” %>

@Assembly Directive

The @Assembly directive is used to make your ASP.NET page aware of external components. This directive supports two attributes:

a. Name: Enables you specify the name of an assembly you want to attach to the page. Here you should mention the filename without the extension.

b. Src: represents the name of a source code file


<%@ Assembly Name="YourAssemblyName" %>

@MasterType Directive

To access members of a specific master page from a content page, you can create a strongly typed reference to the master page by creating a @MasterType directive. This directive supports of two attributes such as TypeName and VirtualPath.

a. TypeName: Sets the name of the derived class from which to get strongly typed references or members.

b. VirtualPath: Sets the location of the master page from which the strongly typed references and members will be retrieved.

If you have public properties defined in a Master Page that you'd like to access in a strongly-typed manner you can add the MasterType directive into a page as shown next


<%@ MasterType VirtualPath="MasterPage.master" %>

this.Master.HeaderText = "Label updated using MasterType directive with VirtualPath attribute";

10/23/08

Caching in Asp.net

* Introduction
* What is Caching ?
* Different Caching Location.
o Client Caching
o Proxy Caching
o Reverse Proxy Caching
o Web Server Caching
* Advantages and Disadvantages of Caching
* Caching Opportunity in ASP.NET
* Different Types of Caching
o Page Output Caching
o Fragment Caching
o Data Caching
+ Caching Dependency
# File Based Dependency
# Key Based Dependency
# Time Based Dependency
* Caching Considerations
o Output Caching Considerations
o Data Caching Consideration
* Suggested Uses of Caching Types


Introduction

In our last project we have developed a sites for a large number of user, Larger number of client means large number of request to your web server, heavy load on network, cause performance issue. For solving this problem I have worked on using of caching on our web application. Now I think why should not I write one article on Code project on it. I am writing this article that what ever I have learned from my Practical Experience, Net Surfing and Different Books for completing my assignment . Most of the thinks are very common to maximum of reader, but I have tried to write some different way that it can be understandable by all beginners also. Main interest that I have found while writing the article that setting up the different location for caching, I have also given the corresponding Visio Diagram also. Hope You will definitely like it.

What is Caching ?

Web applications are accessed by multiple users. A web site can have an extremely low load for minimum number of client access which provide faster access of the sites or may be heavy load on the site can increase exponentially which can slow down the server as well as access of Sites . Slow access is the most common problem for any web site when it is accessed by a large number of client simultaneously. For resolve this problem we can have used high level of hardware configuration, Load Balancer , High bandwidth but load is not the only reason that make a web site is slow , so we need to provide such kind of mechanism which also provide fast data access and provide performance improvement of web site. Caching provide the solution.

Caching is a technique where we can store frequently used data and Web pages are stored temporarily on local hard disks for later retrieval. This technique improves the access time when multiple users access a Web site simultaneously or a single user accesses a Web site multiple times. Caching for Web applications can occur on the client (browser caching), on a server between the client and the Web server (proxy caching / Reverse Proxy Caching), and on the Web server itself (page caching or data caching).

Maximum time we chose web server to store cached data though it improved the performance but it does not solve our purpose every time. If we consider about load on Web Server we have to consider about the location that when the cached data should store. Following section will describe on different location of storing cached data.

Different Caching Location

Caching in a web application can be done either on client side (Client Browser), In between Client and Server (Proxy & Reverse Proxy Caching ) and on Server Side( Data Caching/ Page Output Caching) . So we can classified caching location in 4 way

  1. Client Caching
  2. Proxy Caching
  3. Reverse Proxy Caching
  4. Web Server Caching

1. Client Caching : In Client Caching Client Browser perform caching by storing cached data on local disk as temporary file or browser internal memory. This provide quick access of some information by client which reduce the network load and server load also. This information can't be shared by other clients so it is client specific.

client_caching.jpg

Fig 1.0 : Client Caching

Advantages

  1. Data that are cached on local client can be easily accessed
  2. Reduce Network Traffic

Disadvantages

  1. Cached data are totally browser dependent, so it is not shareable

2. Proxy Caching : Main disadvantage of Client caching was data that are store on client browser are client specific. Proxy Caching technique used a dedicated server that store caching information in between client and web server in a shared location, that all client can used same shared data. The proxy server (e.g. Microsoft Proxy Server ) fulfills all the requests for the Web page without sending out the request to the actual Web server over the Internet, resulting in faster access.

proxy_caching.jpg

Fig 1.0 : Proxy Caching

Proxy caches are often located near network gateways to reduce the bandwidth . Some times Multiple Proxy Cache server is used for larger number of client. This is called Cache Array.

cache_array.jpg

Fig 1.1 : Cache Array

Advantages

  1. Data that are cached on proxy server can a accessed easily
  2. Reduce Network Traffic

Disadvantages

  1. It a Deployment and Infrastructure overhead to maintain a Proxy Cache Server

3. Reverse Proxy Caching : Some Proxy Cache server can placed in front of web server to reduce the number of requests that they receive. This allows the proxy server to respond to the frequently received requests and pass the other requests to the Web server. This is called a reverse proxy.

Reverse_Proxy_Caching.jpg

Fig 1.2 : Reverse Proxy Caching

Advantages

  1. Data that are cached on reverse proxy server can a accessed easily
  2. Web server reduce the number of request

Disadvantages

  1. As the Server configured in front of Web sever some what it increases the network traffic.

4. Web Server Caching : In Web server caching cached data stored inside the web server, Data caching and page caching used web sever caching mechanism.

Web_Server_Caching.jpg

Fig 1.3 : Web Server Caching

Advantages

  1. Improve the performance of sites by decreasing the round trip of data retrieving from database or some other server

Disadvantages

  1. Increase the Network Load

Advantages and Disadvantages Of Caching

Advantages

  1. Reduced server load
  2. Reduced bandwidth consumption

Caching Opportunity in ASP.NET

ASP.NET provides support for page, partial page (Fragment), and data caching. Caching a page that is dynamically generated, called page output caching . In page caching when a pages is cached that dynamically generated only the first time it is accessed. Any subsequent access to the same page will be returned from the cache.. ASP.NET also allow to Cached a portion of a page called Partial page caching or Fragment Caching . Other server data are cached (e.g. SQL Server data, XML Data ) that can be easily accessed with out re-retrieving that data using data Caching . caching reduce number of round trip of database and other data source. ASP.NET provides a full-featured data cache engine, complete with support for scavenging (based on cache priority) , expiration, and file and key , Time dependencies . There are two locations where caching can be used to improve performance in ASP.NET applications.

Caching_Opportunity_in_ASP.NET.jpg

Fig 1.4 : Caching Opportunity in ASP.NET

In above picture (1) is used for return caching of page that means its used in output caching and (2) save the round trip by storing the data using data caching.

ASP.NET supports two types of expiration policies, which determine when an object will be expired or removed from the cache. These two policies are described as follows:

Absolute expiration: Determines that the expirations occur at a specified time. Absolute expirations are specified in full-time format (hh:mm:ss). The object will be expired from the cache at the specified time.

ASP.NET Supports Three Type of Caching

  1. Page Output caching [Output caching ]
  2. Fragment caching [Output caching ]
  3. Data Caching

Different Types of Caching

1 . Page Output Caching : Before starting Page Output caching we need to know the compilation process of a page, because based on the generation of page we should able to understand why should we used caching . ASPX Page compiled in two stage process. First, the code is compiled into the Microsoft Intermediate Language (MSIL). Then, the MSIL is compiled into native code (by JIT Compiler ) during execution. and entire code in an ASP.NET Web page is compiled into MSIL when we built the sites , but at the time of execution only the portion of MSIL Converted to native code which is need by user or user request, which also improve performance.

Page_Execution.jpg

Fig 1.5 : ASP.NET Page Execution Process

Now what ever we are getting , if there is some page which change frequently JIT need compile every time. So, We can use Page output for those page which content are relatively static. So rather than generating the page on each user request we can cached the page using Page output caching so that it can be access from cache itself. so, Instead of pages can be generated once and then cached for subsequent fetches.Page output caching allows the entire content of a given page to be stored in the cache.

Page_Output_caching.jpg

Fig 1.5 : Page Output Caching

As from given picture, when the first request is generated page is been cached and for same page request page should be retrieve from cache itself rather that regenerating the page.

For Output caching , OutputCache directive can be added to any ASP.NET page, specifying the duration (in seconds) that the page should be cached. The code.

Example

<%@ Page Language="C#" %>

<%@ OutputCache Duration='300' VaryByParam='none' %>
<html>

<script runat="server">
protected void Page_Load(Object sender, EventArgs e) {
lbl_msg.Text = DateTime.Now.ToString();
}
script>

<body>
<h3>Output Cache example</h3>
<p>Page generated on:
<asp:label id="lbl_msg" runat="server"/></p>
</body>
</html>

We also set Caching property from Codebehind also
void Page_Load(Object sender, EventArgs e) {

Response.Cache.SetExpires(DateTime.Now.AddSeconds(360));
Response.Cache.SetCacheability(
HttpCacheability.Public);
Response.Cache.SetSlidingExpiration(true);
_msg.Text = DateTime.Now.ToString();
}

We have to have mention the Duration and VaryByParam attributes. Duration Define how long time cache will persist. VaryByParam is meant for is there any change with parameter for cache.

Varyparam_Cached.jpg

Fig 1.6 : Caching multiple page based on parameters

As above picture shown , if we are using query string for page and we need to cached all the page based on the query string, we have to use VaryByParam attributes of outputcache. Based on every query string data should be cached, and when user request page among those query string (id in picture) page should be fetched from cached. Following example describe the detsils use of VaryByParam Attributes.

Example:

<%@ OutputCache Duration="60" VaryByParam="*" %>

page would cached for 60 seconds, and would create a separate cache entry for every variation of querystring

Following table shown you the most commonly used and most important attributes of outputcache:

Attribute Values Description
Duration Number Define how long page will be cached (in seconds)
Location 'Any'

'Client'

'Downstream'

'Server'

'None'

It define the page cached location. I have discussed it later in details
VaryByCustom 'Browser' Vary the output cache either by browser name and version or by a custom string,
VaryByParam 'none' '*' This is a required attribute, which is required for parameter for the page. This I have already discussed.

All the attributes that we specify in an OutputCache directive are used to populate an instance of the System.Web.HttpCachePolicy class by calling. The complete implementation of cache policies provided by ASP.NET is encapsulated in the HttpCachePolicy class. Following is the another implementation of caching from code behind.

Output Caching Location

As I have already mention We can store cached data in different location like client, server or in between client and server , Now I am going to discuss how this is feasible to set location of cached data. If we store the cached data it save the page rendering time by fetching the data from catch. There is another way that we can save cached data on client browser , which reduce the network traffic. OutputCache directive on a page enables all three types of caching—server, client, and proxy—by default.

Following Table shown you the Location details . It show the location of cached and what should be the effects on Cache-Control and Expires Header.

Value of Location Cache-Control Header Expires Header Page Cached on Server Description
'Any' public Yes Yes Page can be cached on the browser client, a downstream server, or the server
'Client' private Yes No Page will be cached on the client browser only.
'Downstream' public Yes No Page will be cached on a downstream server and the client
'Server' no-cache No Yes Page will be cached on the server only.
'None' no-cache No No Disables output caching for this page.

For example, if you specified a value of 'Client' for the Location attribute of an OutputCache directive on a page, the page would not be saved in the server cache, but the response would include a Cache-Control header ( Pages can indicate whether they should be cached on a proxy by using the Cache-Control header.) value of private and an Expires header (HTTP response, indicating the date and time after which the page should be retrieved from the server again ) with a timestamp set to the time indicated by the Duration attribute

Example

<%@ OutputCache Duration='120' Location='Client'      VaryByParam='none' %>

This would save the cached for 120 second and cached data should not be saved on Server it should store only on client browser.

2 . Page Fragment Caching : ASP.NET provides a mechanism for caching portions of pages, called page fragment caching. To cache a portion of a page, you must first encapsulate the portion of the page you want to cache into a user control. In the user control source file, add an OutputCache directive specifying the Duration and VaryByParam attributes. When that user control is loaded into a page at runtime, it is cached, and all subsequent pages that reference that same user control will retrieve it from the cache.

Fragment_Cached.jpg

Fig 1.7 : Fragment Caching

Following Example shown you details of Fragment caching

Example

<!— UserControl.ascx —>


<%@ OutputCache Duration='60'
VaryByParam='none' %>
<%@ Control Language="'C#'" %>

<script runat="server">
protected void Page_Load(Object src, EventArgs e)
{
_date.Text = "User control generated at " +
DateTime.Now.ToString();
}
</script>
<asp:Label id='_date' runat="'server'" />

Here I have user caching on user control, so when ever we used in a page , only partial page will be cached.

3. Data Caching : Caching of data can dramatically improve the performance of an application by reducing database contention and round-trips. Simply data caching store the required data in cache so that web server did not send request to DB server every time for each and every request which increase the web site performance. For data caching we need to cached those data which is accessible to all or which is very common data. The data cache is a full-featured cache engine that enables you to store and retrieve data between multiple HTTP requests and multiple sessions within the same application .

datacaching.png

Fig 1.8 : Data Caching

Above image showing how data can be accessed directly from data base server and how data retrieving using cache. Data caching is not only related with SQL Server, we can store other data source data (as shown on Fig 1.4).

Now let see, how we can implement data caching in our web application. There are Three Different way to add data or object into cache. But based upon the situation we have to access it. These methods are Cache[], Cache.add(), cache.insert(). The following table will show you the clear difference of there methods.


Stored data in cache

Support Depedency

Support Expiration

Support Priority Settings

Return Object

cache[] Yes No No No No
cache.insert() Yes Yes Yes Yes No
cache.add() Yes Yes Yes Yes Yes

As we are getting, cache[] is property that is very simple to use but cache.insert() and cache.add() are having some more property which give us more control on cached data.

Now we should look into details of Cache.Insert() and Cache.Add() methods. Cache.Insert() having 4 overloaded method where as Cache.Add() having no overloaded methods. Following table are showing are most commonly used important property for those methods.

Property Type Description
Key String A unique key used to identify this entry in the cache
Dependency CacheDependency A dependency this cache entry has—either on a file, a directory, or another cache entry—that, when changed, should cause this entry to be flushed
Expires DateTime A fixed date and time after which this cache entry should be flushed
Sliding Expiration TimeSpan The time between when the object was last accessed and when the object should be flushed from the cache
Priority CacheItemPriority How important this item is to keep in the cache compared with other cache entries (used when deciding how to remove cache objects during scavenging)
OnRemoveCallback CacheItem RemovedCallback A delegate that can be registered with a cache entry for invocation upon removal


Cache.Insert() Method

[Cache.Insert() Code Example]

First two are the mandatory for Cache.Insert() methods, whereas others vary based on the situation.

Caching Depedency

Using Cache dependency we can set the dependency of the catch with some data or entity to changed. So we can set the depedency of cache by which we can update, remove cache. There are three types of dependencies supported in ASP.NET.

  • File based Dependency
  • Key Based Dependency
  • Time Based Dependency

File Based Dependency : File-based dependency invalidates a particular Cache item when a file(s) on the disk changes.

Using cache dependency we can force ASP.NET to expire the cached data item from the cache when the dependency file changes. We can set Dependency to multiple file also . on such case dependency should be built from an array of files or directories.

Use : File based dependency is very use full when need to update some data that displaing to the user based on some changed on file. As for Example, a New Sites always shows data from a file , now if some breaking news come, they just update the file and cached should expire and during the expire time we can reload the cache with updated data using OnRemoveCallBack

Key Based Dependency : Key-based dependency invalidates a particular cache item when another cache item changes.

Use : This is use full when we have multiple interrelated object are in cache and if one of the object changed we need to updated or expire all of them, Key Based Dependency will be best option

Time Based Dependency : Time-based dependency causes an item to expire at a defined time. Cache.Insert() method of the Cache class is used to create a time-based dependency. Two Types of Time based Dependency are available.

  • Absolute
  • Sliding

Absolute: Sets an absolute time for a cache item to expire. Absolute expirations are specified in full-time format (hh:mm:ss). The object will be expired from the cache at the specified time.

Sliding: Resets the time for the item in the Cache to expire on each request. This is useful when an item in the cache is to be kept alive so long as requests for that item are coming in from various clients.

With those dependency ASP.NET also support

In addition to the dependencies, ASP.NET allows the following:

Automatic expiration: The cache items that are underused and have no dependencies are automatically expired.

Support for callback: The Cache object can be configured to call a given piece of code that will be executed when an item is removed from the cache. This gives you an opportunity to update the cache. We can use OnRemoveCallback().

Caching Considerations

Output Caching Considerations
    1. Enable output caching on a page that is frequently accessed and returns the exact same contents for many of those accesses

    2. When enabling output caching for a page, be sure not to introduce incorrect behavior and/or rendering for any particular client.

    3. Determine the duration of the cached page carefully to balance speed of access (throughput) with memory consumption and cache coherency correctness.

    4. Consider enabling sliding expiration on a page if you end up using VaryByParam='*'.

Data Caching Consideration
    1. The data cache is not a container for shared updateable state.

    2. Cache data that is accessed frequently and is relatively expensive to acquire.

    3. If data is dependent on a file, directory, or other cache entry, use a CacheDependency to be sure it remains current.

Suggested Uses of Caching Types

Situation Suggested Caching Type

The generated page generally stays the same, but there are several tables shown within the output that change regularly.

Use Fragment Caching in this situation.

The generated page constantly changes, but there are a few objects that don’t change very often.

Use Data Caching for the objects.

The generated page changes every few hours as information is loaded into a database through automated processes.

Use Output Caching and set the duration to match the frequency of the data changes.



IIS 7.0

1. Introduction to IIS 7.0
2. Features of IIS 7.0
3. Basic Architecture of IIS 7.0
4. How To Deploy ASP. Net Websites on IIS 7.0
5. How To Create Application Pool
6. Assign Application Pool To Your Application
7. Configure Web Garden on IIS 7.0
* What is Application Pool?
o Types of Application Pool
o Identity Of Application Pool
* How To Create An Application Pool and Assign To a Web Application
* What is Web Garden?
* How To Create Web Garden?
* Is it Recommended to use Web Garden ?
8. IIS 6.0 Vs IIS 7.0
9. Where do I get IIS 7.0

Introduction to IIS 7.0

Microsoft Internet Information Services (IIS) 7.0 in Windows Server 2008 and Windows Vista provides a secure, manageable platform for developing and administrating and hosting Web applications and services. It has been completely redesigned and Restructured .IIS 7.0 provides features and functionality for administrators to effectively manage Web infrastructures; developers to rapidly build Web applications and services; and hosters to Web hosting .

IIS7_new.JPG

Features of IIS 7.0

Following are some features of IIS 7.0

  • IIS 7.0 provides features and functionality that enable administrators to reliably and effectively manage Web infrastructures.
  • IIS 7.0 has a distributed file-based configuration system that enables IIS settings to be stored in web.config files along with the ASP. NET settings.

  • IIS 7.0 provides a cost-effective, more scalable Web server platform for delivering reliable Web hosting to a broad set of customers.

Major innovations in IIS 7.0 :

  • A modular, extensible core Web server

  • A unified, distributed file-based configuration system

  • Integrated health monitoring and diagnostics

  • A set of new administration tools with delegation support

    For More Features and Product Understanding Check Here

Basic Architecture of IIS 7.0

Following Diagram are showing the Overall Architecture of IIS 7.0 Which Contain HTTP.Sys, SvcHost.exe,Application Pool and Worker Process(W3Wp).

II7_Archi.JPG

Main Components of IIS 7.0 are HTTP.Sys, Svchost.Exe, Application Pool , Worker Process (W3WP.exe) and Configuration Store. HTTP.Sys : It the Kernel mode Protocol stack which listen the HTTP and HTTPS Request. W3SVC and WAS are the part of Svchost.exe . W3SVC is the Listner of Request from kernel mode that passed by the HTTP.Sys. W3SVC also interact with Windows Activation Process Which is Managed the Worker Process by Starting , Stopping and Recycling the Application Pool . WAS also Responsible for Health Monitor of Application Pool during Runtime. Configuration Store All web.config and Asp.Net Setting and other configuration in XML Hierarchy form. W3wp.exe is a long-running process that processes requests and generates responses.


Following Diagram Shown you the Process Flow of IIS 7.0. This the flow of User Request to IIS and Get the Response from IIS.

ProceessFlowofIIS.JPG

User Request Pass From Kernel Level To User Level Via Http.Sys. And the passes to svchost, and then goes to Application Pool.

For more Details Please Click Here

How To Deploy ASP. Net Websites on IIS 7.0

From Now onward I will describe one Example To deploy your ASP.Net websites on IIS 7.0 .
Step 1: From Visual Studio Published Your Web Application .
Step 2: Copy The Published Application Folder to "C:\intepub\wwwroot" [default] Folder.
Step 3: From RUN - > inetmgr -> OK
Following Screen Will Come . This is the main Page for Any Application. There are Three Panel.

Main_DefaultIIS.JPG

"TestWeb" is recently pasted webapplication on your wwwroot folder.
Step 4 : We need to Convert it to Application , just RightClick and and Then Click on "ConvertToApplication" as Following picture

ConvertToApplication.JPG

After Converting it to Application its icon will be changed and then you can set the property for your web application from middle pane. you can set IIS Authentication Mode, Default Page Just like IIS 6.0

ConvertedToApplication.JPG

You can Change Security Settings on Authentication Section. Bydefault Setting will be set from your web.config itself. As in my web.config Form Authentication was set that's why, Forms Authentication has been Enabled. if we want to change the Status just double click and update status to Enabled to Disabled or Vice Versa.

AuthenticatinSettings.JPG

Now one most important part to Set Application Pool for you application.

A site can contain many applications including that site’s default application, which is called the root application. In addition to belonging to a site, an application belongs to an application pool, which isolates the application from applications in other application pools on the server .

Step 1: Right Click on Application Pool and Give the Name of your Pool here i have given "pool" and select Framework and click on OK

PoolCreation.JPG

Step 2 : if you are writting some thing on server [ May be writes Error Events Logs ] , you need to Change the Pool Identity to Local System . Right Click on Pool Identity set seeting as following image

There are Three Identity of Application Pool

  • Network Service
  • Local Service
  • Local System

changePoolIdentity.JPG

Now , we need to assign the Application Pool to our web application

Step 1: Right Click on "TestWeb" Application and Select "Advanced Settings"

asingAppPool.JPG


Step 2: Finaly Assign Your Created Application Pool "pool" to "TestWeb" Application.

FinalAppPoolAsign.JPG


Now you can run your application by just typing http:\\localhost\testweb and it can be accessable on network by ip also.

Configure Web Gardens in IIS 7.0

I have split this section with some Parts , these are

Application pools used to separate set of IIS worker processes that share the same configuration. Application pools enable us to isolate our web application for better security, reliability, and availability. The worker process serves as the process boundary that separates each application pool so that when one worker process or application is having an issue, other applications or worker processes are not affected.

aPPpIOOL.JPG

Fig : Application Pool With Worker Process On IIS Server

In your IIS there may be more than on Web sites hosted and by creating Application Pool , you can just Assign a Separate Worker Process to your application. I have already discussed how you can assign Application Pool To your web application

Type of Application Pool :

There are Two Predefined Applocation Pool is IIS 7.0

  1. DefaultAppPool (Integrated)
  2. ClassicAppPool

None of Application Pool Installed bydefault when IIS 7.0 is installed. Classic Application Pool is installed when Asp.Net 2.0 is installed in the System

Identity Of Application Pool :

Application pool identity configuration is an important aspect of security in IIS 7.0, because it determines the identity of the worker process when the process is accessing resource. This Settings comes form IIS 6.0. in IIS 5.0 There Application pool runs under the local system account. In IIS 7.0 there are Three predefine Identity , that are same with IIS 6.0

Applicationpool Identity

Description

LocalSystem

LocalSystem is a built-in account that has administrative privileges onthe server. It can access both local and remote resources

LocalServices LocalServices Built-in account has privileges of an authenticated local user account . It does not have any network access permission
NetworkServices This is the default Identity of Application Pool NetworkServices has privileges of authenticated local user aaccount and it can have access remote resource as machine account.

This has been already discussed

Creating Application Pool And Assign it to a Web Application

By default Each Application Pool runs with a Single Worker Process (W3Wp.exe) . We can Assign multiple Worker Process With a Single Application Pool. An Application Poll with multiple Worker process called "Web Gardens" . Many worker processes with same Application Pool can sometimes provide better throughput performance and application response time. And Each Worker Process Should have there own Thread and Own Memory space.

WEb_Garden.JPG

Fig: General Block Diagaram of Web Garden

As Given in Picture, in IIS Server there may be multiple Applicationpool and each application pool having at least a single Worker Process. Web Garden should contain multiple Worker process.

There are some Certain Restriction to use Web Garden with your web application. If we use Session Mode to "in proc" , our application will not work correctly because session will be handled by different Worker Process. For Avoid this Type of problem we should have to use Session Mode "out proc" and we can use "Session State Server" or "SQL-Server Session State".

Main Advantage : The worker processes in a Web garden share the requests that arrive for that particular application pool. If a worker process fails, another worker process can continue to process requests.

Create a New Application Pool. Right Click -> Advance Setting -> Go To Process Model Section , Set the Value for Maximum Worker Process

IIS_Update.JPG

It not always recommended to use Web Garden To Your Application affects to performance of your sites except in very specific cases like some long running Synchronous request or Application is very unstable .

IIS 6.0 Vs IIS 7.0

Main Advantages of IIS 7.0 is Modular Design. Which gives some benefits fo to IIS 7.0 over IIS 6.0. Followin table showing you some difference of IIS 6.0 and IIS 7.0 .

Features

IIS 6.0

IIS 7.0

Architecture Monolithic Modular
Setup Most Features Installed Minimum installtion based on role
Extended Features ISAPI Filter and ISAPI Extention Added Module and handler in managed or native code
Customize UI Normal Customize for .NET

There are many more Difference are There.

Where Do I Get IIS 7.0

IIS 7.0 Will Not available with All Operating System . There are some Specific OS and Specific Version For IIS 7.0 .

Operating System With Edition Available

Windows Server 2008 Yes
Windows Vista (Home Basic) No (Default) Need to be Install
Windows Vista (Home Premium) No (Default ) Need to be install
Windows Vista (Business) Yes
Windows Vista ( Ultimate ) Yes


10/16/08

Difference between HLD and LLD

For people who have been involved in software projects, they will constantly hear the terms, High Level Design (HLD) and Low Level Design (LLD). So what are the differences between these 2 design stages and when are they respectively used ?

High – level Design gives the overall System Design in terms of Functional Architecture and Database design. It designs the over all architecture of the entire system from main module to all sub module. This is very useful for the developers to understand the flow of the system. In this phase design team, review team (testers) and customers plays a major role. For this the entry criteria are the requirement document that is SRS. And the exit criteria will be HLD, projects standards, the functional design documents, and the database design document. Further, High level deign gives the overview of the development of product. In other words how the program is going to be divided into functions, modules, subdivision etc.

Low – Level Design (LLD): During the detailed phase, the view of the application developed during the high level design is broken down into modules and programs. Logic design is done for every program and then documented as program specifications. For every program, a unit test plan is created. The entry criteria for this will be the HLD document. And the exit criteria will the program specification and unit test plan (LLD).
The Low Level Design Document gives the design of the actual program code which is designed based on the High Level Design Document. It defines Internal logic of corresponding submodule designers are preparing and mapping individual LLD's to Every module. A good Low Level Design Document developed will make the program very easy to be developed by developers because if proper analysis is made and the Low Level Design Document is prepared then the code can be developed by developers directly from Low Level Design Document with minimal effort of debugging and testing.

10/5/08

Other Cool Controls

CAPTCHASP lets users in and keep bots out. This free control provides instant, highly customizable CAPTCHA verification. Try the live demo now and download the control here:

http://SteveOrr.net/FreeControls/CAPTCHASP


WebChat is a free, fully functional chat room control. The control uses AJAX to make efficient use of bandwidth and create a smooth user experience. Download the full control (and source code) for free and read the accompanying article that describes how it works in detail.

http://SteveOrr.net/articles/WebChat.aspx


SharpZipLib is an open source project that enables you to implement file compression functionality using several of the most standard formats. The C# source code is well written and the online forum provides lots of Q&A.

http://www.icsharpcode.net/OpenSource/SharpZipLib/Default.aspx


Master the art of search with this free custom SearchBox control that provides the ability to search your web site, other web sites, or the entire web. The source code is included free along with the accompanying article that details the inner workings of the control.

http://SteveOrr.net/articles/SearchBox.aspx


.NET Communication Library is provided by ComponentSpot.com to handle NNTP needs. Although Outlook Express is a “good enough” newsreader for most folks, you can create your own usenet software with this open source component. ComponentSpot.com also provides several other networking components that you’ll be interested in browsing if you’re into that kind of thing.

http://www.componentspot.com/products/index.aspx?MasterCat=2


Written in pure C#, FreeSMTP is a component by Quiksoft for creating and sending e-mails. Using this component you can send e-mails with as little as one line of code. There are no dependencies (other than the .NET Framework, of course) and it provides functionality that the standard System.Web.Main class doesn’t, such as progress monitoring, file logging, and HTML messages with alternate body text.

http://www.quiksoftcorp.com/freesmtp/


PdfCreator by Serdar Dirican is a component that allows you to visually export content to a PDF document. You can design the document from within Visual Studio. The impressively complex C# source code is available for download, but you’ll need to remember to import the System.Windows.Forms.dll to get it to work with ASP.NET Web applications.

http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=5588085e-3d0b-4db8-8a88-603ef212d0db


ID3Util by Ambientware is an MP3 Tag Parser component that allows you to extract track information from MP3 files. The open source VB.NET code is a mere download away.

http://www.ambientware.com/components/ID3Util.aspx




FreeTextBox And TextBox Editor Control

Fancy Textboxes

I think it’s fair to say that every Web site contains at least one textbox. The HTML textbox has been a standard for a long time, and it does its job quite well. Its only flaw is that it is just so plain. It can’t display any fancy HTML formatting like people have come to expect from Windows applications. It provides no easy way for users to enter rich text, HTML content, or to restrict the content that users can enter. There are textboxes out there that will do these things, and more — and they are merely a download away.


FreeTextBox by John Dyer is compatible with Internet Explorer and Mozilla browsers. The user interface is nearly identical to Microsoft Word, so your users should find it to be quite familiar and intuitive. It’s also nearly as functional as Microsoft Word, providing a truly rich environment for users to enter nicely formatted documents.

http://www.freetextbox.com

Figure 2: FreeTextBox allows your users to enter richly formatted documentation and is ideal for content management systems.


htmlArea is another great WYSIWYG text editing control available to allow users rich text entry. InteractiveTools.com has generously provided this control free of charge under a simple BSD open-source license. Although they don’t provide support for the control, they do provide a free forum on their Web site that appears to be full of plenty of answers to common questions, as well as thorough online documentation. If you have the luxury of dictating that your users have Internet Explorer 5.0 or above, then this is an easy to use control that will likely be a valuable resource in your toolbox.

http://www.htmlarea.com


XStandard is fine example of a cross-browser rich textbox web control. The reasonably full-featured lite version is free even for commercial use, while the pro version costs some money.

http://www.xstandard.com/


FCK Editor is another free textbox control that provides rich editing capabilities. I haven't played with it personally, but I've gotten good reports about it from fellow developers, so you might as well check it out:

http://www.fckeditor.net/


15 Seconds provides VB.NET source code for a masked edit control that you can customize to your heart’s content. The associated article provides all you need to know about the control and how to add your own masks.

http://www.15seconds.com/issue/030506.htm


I have created a free Numeric Textbox control. It accepts numbers only, other characters are not permitted to be entered. It's nothing incredibly fancy but the source code is free and so is the article that explains it. This is a good place to start to learn how to create your own web controls.

http://SteveOrr.net/articles/InheritAndExtend.aspx



FTP (File Transfer Protocol) Asp.net

Alex Kwok has been gracious enough to provide a free component for handling FTP transfers — because the current implementation of .NET has a mysterious hole where this functionality should be. This FTP client appears to have all the basic functionality you’d expect, such as uploading and downloading files, listing directories, and deleting and renaming files. A healthy dose of sample code is also available.

http://www.codeproject.com/dotnet/dotnetftp.asp


GotDotNet.com provides another great example of an FTP client component. It allows you to upload, download, manage directories, and perform most other basic file operations. The VB.NET source code is freely available and well written. Sample code for using the control is also included in the download. An online forum lists many discussion topics about the component in case you’d like to learn more about the inner workings and how to extend it.

http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=DD5E4A38-7F5B-45E0-9C36-64B987947C20



Mega Sites

There are several Web sites out there that provide entire libraries of Web controls for you to browse. Many of the controls are free, and most of them at least provide free demos. When you’ve got some time on your hands, I suggest you dig into these fine Web sites and mine the gold that is contained within.


The open source ASP.NET AJAX Control Toolkit is stuffed with dozens of useful and attractive controls that integrate quite well with ASP.NET AJAX. Of course its all free, so download it and see what all the commotion is about or simply try their demos online without having to install a thing.

http://Ajax.asp.net/AjaxToolkit/


In case you missed it, Microsoft released several free Web controls shortly after the release of ASP.NET. The download is quick and easy, and provides several controls that make fine additions to any Web developer’s toolbox. Their TreeView control is one of my favorites, although there are also nice implementations of a Toolbar, Tabstrip, and Multipage control. As you’d expect from Microsoft, the documentation is thorough, and there are plenty of examples.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/aspnet-usingtreeviewiewebcontrol.asp


You might say this web site is a mini-mega site. In case you haven't ran across them yet, there are a variety of free controls available here, such as a MessageBox control, a Confirmation Button, and Window Opener control, a Bar Graph control, a Numeric TextBox, a Rollover Button, a ComboBox, an Export Panel control, a Streaming Media control, and more! Find them all here:

http://SteveOrr.net/articles/


CodeProject.com provides dozens of open source Web controls, such as Schedule Controls, Master Page solutions, Cookie Encryption, and more.

http://www.codeproject.com/index.asp?cat=4


SourceForge.net is the world’s largest open source development Web site. It provides thousands of projects, although most of them aren’t .NET, so you’ll have to sift through to find the ones that suit you. Luckily, you can do searches and filters based on language. This site contains .NET projects for RSS news aggregators, SMTP, Bar Graphs, Wiki, etc.

http://sourceforge.net


If you don’t know about http://www.asp.net by now, it’s time you learn. The Control Gallery lists hundreds of Web controls, including Charting Controls, Navigation Controls, Image Libraries, and much more. Even though not all the controls are free, this Web site definitely deserves to be saved in your IE Favorites because of the sheer volume of useful information contained within.

http://www.asp.net/ControlGallery


MetaBuilders, headed by cohort Andy Smith, provides more than two dozen completely free high-quality Web controls. There are controls for practically every need you’ll ever come across, such as a Slide Menu, a deluxe ComboBox, a Scrolling Panel (which retains its scroll position between postbacks), and an intriguing Master Pages system, just to name a few. The C# source code is freely available, as well, so you can learn from the master and build on his creations.

http://www.metabuilders.com


Carlos Aguilar Mares provides several nice free controls on his Web site, such as a client-side DataGrid (mentioned earlier), a WebChart control for creating charts and graphs, and an ExcelWriter component for exporting content to Excel. There are several other controls you may find useful, too; I recommend you take a look.

http://www.carlosag.net


Excentrics World provides a dozen free Web controls that will likely come in handy at various points in your development, including (but not limited to) a Masked Textbox, Numeric Textbox, and Calendar Popup. Although the controls are free, the source code can be purchased for US$75.

http://www.eworldui.net/CustomControls/default.aspx


411ASP.net provides links to hundreds of ASP.NET controls for Charts, File Management, Content Management, Site Statistics, and oh so much more. They aren’t all free, but the variety is quite pleasing.

http://www.411asp.net/home/assembly




Free Grid Controls

I don’t mean to put down the standard ASP.NET DataGrid control — it is, after all, light years ahead of any grid control that Web developers had available to them in the past. However, there is room for improvement. For starters, the standard DataGrid is very server-based, requiring postbacks to perform even the most basic functions. This makes the performance a lot weaker than it could be if the functionality were moved to the client side. Here are a couple of free grid controls that move sorting and paging to the client side, where it (arguably) should be for optimal performance in most situations.


The DataIslandGrid Control by Reflection IT is a superb example of what is available for developers. It serializes the data to XML and uses little-known (IE 5+) DHTML functionality to bind on the client side. Advanced JavaScript and CSS functions are also leveraged to make all the magic possible. The source code is freely available, too, as well as thorough documentation so you can dig in and fully understand how it all works.

http://www.reflectionit.nl/DataIsland.aspx


The XGrid control by Carlos Aguilar Mares is another fine example of client-side grid functionality implemented as an Internet Explorer Behavior. It supports XML islands, row selection, and reloading the grid content without having to reload the rest of the page. It’s all handled automatically; you don’t need to know anything about XML or client-side code. The source code is freely available, and documentation and code samples are plentiful.

http://www.carlosag.net/Tools/XGrid




Polls And Voting Controls

Everybody likes to have the freedom to express their opinion. Online polls can be a fun reason for users to regularly return to your Web site. Online polls can also provide valuable feedback about the way your users think and feel. This information can then be used to mold your site into something they like even better. Creating a basic voting control isn’t difficult, but creating a truly flexible and reusable control with a solid design takes more time than most developers have available. So save your valuable time and use one of these fine controls instead.


NetPolls from Votations.com is a flexible voting control that asks only that you register with their Web site. You can configure an unlimited number of questions in the form of radio buttons, checkboxes, and/or dropdown lists. It sports a fully customizable layout, and can be database driven. It’s easy to get started with the control, and design time support is superb. The n-tier architecture is completely documented online.

http://www.votations.com/netpolls/


Web wizard Scott Mitchell created a Content Rater control that will gather valuable feedback from users and faithfully store this information in a SQL Server database. The free C# source code is explained in detail, so you can easily extend this user control in case its already impressive functionality isn’t enough to satisfy your requirements. You might start by converting it to a custom control so it will be more easily reusable across projects.

http://aspnet.4guysfromrolla.com/articles/042104-1.aspx




Free Menu Navigation Controls

A good menu/navigation system is something that every Web site of significant size needs — and yet, amazingly, there isn’t any such control included with ASP.NET. Therefore, most Web developers feel forced to build their own, reinventing functionality that has already been built countless times before. You can take a more efficient approach by using one of the fine menu controls available on the Internet. Following is a sampling of a few of the free ones from which to choose.


The HoverList control (based on the menu at the top of the home page of this site) contains configurable menu items that highlight as the mouse is moved over them at run time. The list can be specified at design time or run time, and may optionally be data bound. Each list item consists of a string value and a formatted text item that may optionally include HTML.

http://SteveOrr.net/articles/HoverList.aspx


The VisiPanel expanding panel control used on the left hand side of this site can be yours for free, source code included. Download it, use it, and read this article to learn how it works if you're curious:

http://SteveOrr.net/articles/VisiPanel.aspx


skmMenu is a standard-looking open-source dropdown menu that would generally be placed near the top of your page. You can configure colors, fonts, and sub-menus via code or bind to an XML file that holds this data. It has thorough documentation online and off — and plenty of code samples.

http://skmmenu.com/menu/


Timothy Humphrey has been generous enough to provide a fairly deluxe dropdown menu too, with detailed documentation and examples available to help you get ramped up quickly. It’s configurable via XML files, and is available free of charge through a standard GNU general public license. He also provides some other interesting controls, such as a tab control and tree control.

http://timothy.humphrey.name/thwc/


Dommelen Slide Menu is a nice option if you want a menu on the side of your Web site instead of the top. It makes efficient use of space, while providing a familiar and friendly user interface. The only downside is the sparse documentation. There also is an interesting slide menu bar available for free.

http://At-Krays.Net/csharp.html


obout Inc.’s Slide Menu presents a user interface similar to the Dommelen Slide Menu, and ups the ante by providing plenty of online documentation and intuitive sample code that demonstrates the various ways the menu can be customized. Although the free basic version appears to be quite functional, there is a Pro version available for purchase that provides extra functionality, such as binding to an XML file.

http://www.obout.com/sm3/basic.aspx



Welcome