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  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
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 with Better Framework
By: Jagadish Chaterjee
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 18
    2005-11-07

    Table of Contents:
  • ASP.NET Custom Server Controls: Cute ToolTip Control with Better Framework
  • What are the properties declared and how do I work with the control?
  • How is it rendered?
  • JavaScripts: from custom control
  • JavaScripts: from IFrameBox.js
  • 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 with Better Framework


    (Page 1 of 6 )

    This article further extends my previous article on “Cute ToolTip control” with a few more enhancements, together with a flexible and understandable approach to the JavaScript code.
    A downloadable file for this article 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.

    How is it different from the old one?

    I already introduced a technique for creating our own “tooltip” control for our web application.  Even though it works well for that scenario, certain features are still missing.  Let us consider what would happen if I wanted to add a HTML table within the tool tip.  By using the method I discussed in my previous article, it is highly complicated.  I actually designed that “tooltip” control simply to display some messages (and it works well only for that scenario).

    But one of my colleagues asked me to improve it a bit, so that it would accept any HTML based content (because it is very easy to work with HTML, rather than with DHTML)!  I liked his suggestion and started designing a flexible JavaScript framework (which is the main problem with my previous control) to achieve his expectations.

    Finally, I came up with a solution by separating JavaScript content (from the custom control) to an external file (.js).  This would cause the browser to cache the JavaScript file in memory, and we can even achieve better performance.  Apart from simply writing structured JavaScript code, now I managed to redesign the JavaScript with some object orientation. 

    As you know, JavaScript is not a complete Object Oriented Programming language (actually it is an Object Based Language), so it is a bit difficult to abstract and encapsulate all the issues.  But, somehow I managed to get it a bit encapsulated.  As there is always room for new innovations (or enhancements), I hope that you would modify and extend the same control according to your necessities. Don’t forget to email me with your better enhancements.

    Coming to the details of the “cute tool tip control” class, I am emitting only IFRAME tags and very little JavaScript code.  I separated the whole burden of JavaScript code to a separate file (.js).  But now you have to carry (of course even copy) the same file to every web application, which needs the tool tip functionality, unless you make an alternate arrangement by configuring your IIS to work for all web applications (from the same host).

    Now that we understand some enhancements to my previous “Cute Tooltip control”, we shall delve into the details of code.

    More ASP.NET Articles
    More By Jagadish Chaterjee


       · Hello....an improved version of Cute tooltip control released...have a look at it...
     

    ASP.NET ARTICLES

    - Develop Your First ASP.NET Website with Visu...
    - Run ASP.NET in Windows XP Home with Cassini ...
    - How to Test a Web Application
    - How to Add Code and Validation Controls to a...
    - Working in Source and Split Views to Build a...
    - How to Build a Web Form for a One-Page Web A...
    - How to Develop a One-Page Web Application
    - An ASP.NET Web Application in Action
    - Developing ASP.NET Web Applications
    - An Introduction to ASP.NET Web Programming
    - Introduction to the ADO.NET Entity Framework...
    - Completing an In-Text Advertising System und...
    - Programming an In-Text Advertising System un...
    - Building an In-Text Advertising System Under...
    - Developing a Mini ASP.NET AJAX Server Centri...





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