ASP.NET
  Home arrow ASP.NET arrow Page 6 - 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 - What is the ToolTip Designer class?


    (Page 6 of 6 )

    That is a special type of class, which gets executed when the control is about to be rendered only at design time.  Here it makes sense to use it, as there is no involvement of design-time properties to be set.  It is defined something like this:

    Public Class ToolTipDesigner
        Inherits System.Web.UI.Design.ControlDesigner

        Public Overrides Function GetDesignTimeHtml() As String
            Return "You will be able to see the tooltips only at
    runtime"
       
    End Function
    End Class

    The method “GetDesignTimeHtml” gets executed when our tooltip control is dragged from the toolbox onto the web page at design time.  As the control does nothing here and it does not have any properties, we simply return a message.

    This class (“ToolTipDesigner”) gets linked to our control with the “<Designer>” attribute at class level.  The class declaration of our ToolTip control would be something like this:

    <Designer(GetType(ToolTipDesigner)), DefaultProperty("Text"),
    ToolboxData("<{0}:ToolTip runat=server></{0}:ToolTip>")> Public
    Class
    ToolTip
        Inherits System.Web.UI.WebControls.WebControl

    That finishes the matter.  Please undestand that all of the ASP.NET controls (in this series) have been tested only with Internet Explorer 6.0.  I request that you  make necessary modifications to suit your needs of cross browser compatibility. I leave it to the developers for further enhancing the same control.  The areas of improving the same control would include better eventing, better JavaScript, data-binding support, cross browser support, and so on. Good luck.

    Any comments, suggestions, bugs, errors, feedback etc. are highly appreciated at jag_chat@yahoo.com.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

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

    ASP.NET ARTICLES

    - Adding Content to a Static ASP.NET Website
    - Building a Static ASP.NET Website in a Basic...
    - 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...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek