Wednesday, July 1, 2009

After years of frustration with JavaScript and cross browser compatibility, a friend of mine introduced me to the wonderful world of jQuery. Then, after also discovering an endless amount of free plugin libraries for jQuery, I immediately went to work to develop reusable user controls for our internal development library. In this example, I will be using the qtip plugin:

2. Next, you will need to take advantage of registering your .js files in page's ClientScript. This is important because if you drop more than one instance of your control on the page, then you only want to include your .js file once.

/// /// If false, then tooltip hides when user unfocuses from the MouseOverClientID element./// If true, then tooltip remains and can be interacted with until focus on to another element on the page occurs.///
public bool IsSticky
{
get;
set;
}
#endregion

4. Finally, you will need to write any initialization for each client instance. Also, you will need to put the content into your placeholder (notice the INamingContainer). Now here is how your OnLoad ought to look now.