ASP.NET
  Home arrow ASP.NET arrow ASP.NET Custom Server Controls: Cute ToolT...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Mobile Linux 
App Generation ROI 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ASP.NET

ASP.NET Custom Server Controls: Cute ToolTip Control
By: Jagadish Chaterjee
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 26
    2005-10-17

    Table of Contents:
  • ASP.NET Custom Server Controls: Cute ToolTip Control
  • What are the properties declared and how do we work with the control?
  • How is it rendered?
  • Javascripts: the heart of tooltip
  • What is the ToolTip Designer class?

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    ASP.NET Custom Server Controls: Cute ToolTip Control


    (Page 1 of 5 )

    This article introduces you to creating a customized “ToolTip” control for your use in ASP.NET web applications.
    A downloadable file for this application is available here.

    The sample downloadable solution (zip) is entirely developed using Visual Studio.NET 2003 Enterprise Architect on Windows Server 2003 Standard Edition.  But, I am confident that it would work with other versions of Windows (which support .NET 1.1) as well.

    What sort of “tooltip” is this?

    This is the main question for which everyone wants the answer.  Everyone knows that tooltips are essential for showing brief “help” for a particular task (or link).  If it is a desktop application (not a web application) we can expose the tool tip's functionality very easily.  Even HTML provides some of the tool tip's functionality for web pages (using the “alt” attribute).  But it is not very customizable. For example, I might like to change the background color or foreground color of the tool tip; that is impossible.

    Considering all of the above scenarios, I decided to design and create my own tooltip control for my web applications.  At the beginning, I thought that it would be very easy to implement (by simply working with “DIV” tag).  But there exists a problem with those tool tips, because they will always be behind “windowed” controls (like dropdown lists) on the web page.  Finally I became mad when I found out the solution.  After searching with Google, I found this solution: my tooltip needs to be equipped with an IFRAME (for Internet explorer only) tag.

    When any content is written to IFRAME, the content always stays ahead of any other control (including windowed controls) on the web page (be careful to provide the proper z-index accordingly).  But, we should always make sure that the “z-index” value is always higher than any other control on the web page.  Some of the custom control designers would always give a z-index value of something like “99999”, thinking that there will not be 100,000 controls on a single page. They are correct.  No web page would ever contain 100,000 controls!  I am also trying to implement the same type of trick in my control.

    But there is one drawback.  Not every browser supports IFRAME!  Consider Netscape; it could not support IFRAME (but supports LAYER in place of it).  As this article mainly focuses on IFRAME, it would only work for Internet Explorer.  But you can enhance this control according to your requirement for cross-browser independence (as I am enclosing full source code as part of a download).

    And another issue is that, I am not simply confirming that this is the only way (or method) to support tooltips in web applications.  This article only gives you an idea of how to start and get working with IFRAMEs in ASP.NET web applications (supporting Internet Explorer) as part of server controls.  I suggest that you enhance the same according to your requirements and all the flavors necessary.

    So, let us start into the details of “tooltip” control.

    More ASP.NET Articles
    More By Jagadish Chaterjee


       · hey guys...Now I give you the tooltip control...just drop me a line...if you need...
       · Thanks for the code. One problem I noticed is that when I ran the sample page...
       · Yes, you are right. At the moment, I didn't implement the concept of "auto-sizing"...
       · Hi ThankYou for your quick Tooltip. It is really good. Small suggestion, in the...
       · hai , i am new to asp.net , can u plz tell how to download total code
       · Hi,can u send this code in C# I am new to ASP.netThanks
     

    ASP.NET ARTICLES

    - Disadvantages of the ASP.NET MVC Framework
    - Advantages of the ASP.NET MVC Approach
    - ASP.NET Web Forms Weaknesses
    - ASP.NET Web Forms Meets ASP.NET MVC
    - Source Code for Saving and Retrieving Data w...
    - Using GridView to Save and Retrieve Data wit...
    - Handling Dynamic Images in ASP.NET 3.5 AJAX ...
    - Retrieving Data with AJAX and the GridView C...
    - Playing with Images in ASP.NET 3.5 AJAX Appl...
    - Saving and Retrieving Data with AJAX
    - Enhancing PHP Via the ASP.NET AJAX Framework...
    - Enhancing PHP Programming with the ASP.NET A...
    - Classes and ASP.NET AJAX
    - Using ASP.NET AJAX
    - Building a Simple Storefront with LINQ

     
    Application Delivery: Everything You Wanted to Know, but Didn`t Know You Needed to Ask
    A comprehensive guide to examining the topics of Wide-area Data Services and app....

     
    Best Practices: Safe and Secure Hardware Asset Recovery
    Companies increasingly must meet EPA and local requirements for the disposal of ....

     
    Managing SSL Security in Multi-Server Environments
    Read this white paper to learn how to simplify management of your organization's....

     
    Open Source Security Myths
    Open Source Software (OSS) is computer software whose source code is available t....

     
    Power and Cooling Capacity Management for Data Centers
    This paper describes the principles for achieving power and cooling capacity man....

     




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
    Stay green...Green IT