ASP.NET
  Home arrow ASP.NET arrow Page 5 - ASP.NET Custom Server Controls: WordHack C...
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: WordHack Control
By: Jagadish Chaterjee
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 9
    2005-11-14

    Table of Contents:
  • ASP.NET Custom Server Controls: WordHack Control
  • What are the properties declared and how do we work with the control?
  • Is it getting rendered onto the page?
  • JavaScripts: the heart of WordHack
  • What is the WordHack 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: WordHack Control - What is the WordHack Designer class?


    (Page 5 of 5 )

    That is a special type of class which gets executed when the control is about to be rendered only at design time.  It is defined something like the following:

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

        Public Overrides Function GetDesignTimeHtml() As String
            Return "WordHack works only at runtime"
        End Function
    End Class

    The method “GetDesignTimeHtml” gets executed when our “WordHack” 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 (“WordHackDesigner”) gets linked to our control with the “<Designer>” attribute at class level.  The class declaration of our “WordHack” control would be something like the following:

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

    That finishes the matter. Please make sure that all of the ASP.NET controls (in this series) have been tested only with Internet explorer 6.0.  I request that you make the necessary modifications to suit your needs of cross browser compatibility. I leave it to the developers to further enhance the same control.  The areas of improving the same control would include better eventing, better JavaScript, cross browser support, and so forth.  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.

       · Hai guys...this is another contribution of mine as part of ASP.NET controls...have a...
       · The demo is very good, but if I put two wordhecks there, the second doesn't work....
       · Hello, I think, I addressed those issues in the next article "ASP.NET Custom Server...
     

    ASP.NET ARTICLES

    - 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
    - Developing a Dice Game Using ASP.NET Futures...





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