ASP.NET
  Home arrow ASP.NET arrow 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  
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: 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


    (Page 1 of 5 )

    This article introduces you to creating a “WordHack” control, which can hack the words you type within a browser environment and automatically redirect to a website based on the user specified hacking word.
    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.

    What is this “WordHack” all about?

    This is the main question everyone would ask.  Before the evolution of the mouse device, everyone liked to type through the keyboard (as it is much smoother than an ordinary typewriter).  When the mouse arrived, everyone wanted to work with the mouse (as it is very easy and flexible to work with a GUI).  Non-typists (who don’t know any fundamentals of typing) use the mouse, as if it is a point of survival for them.  They become very furious if they can't find the mouse, or if the mouse does not work. 

    Then came "hot keys” (or shortcut keys).  I don’t think there exists anybody in this world who does not know about the “Ctrl+C” and “Ctrl+V” key shortcuts.  They are famous, even in the post-mouse era.  Day by day plenty of shortcut keys are being introduced (or even added) to several applications.  Finally, what about the web?

    Even a web page has its own way of capturing the shortcut keys using JavaScript code.  If you are working with Yahoo!Mail or Gmail, plenty of shortcuts already exist to help you do things faster.  Now, why don’t we design our own custom control (in ASP.NET), which can be used to capture the keys the user is typing within a web page?  Why not!

    This article covers that very topic. I don’t want to introduce very sophisticated methods of capturing keystrokes at the very beginning.  We shall increase the sophistication (or complexity) bit by bit within this series of articles.  Initially, I start with designing a simple custom control, which captures a particular word typed by the user and automatically redirects to a particular page upon typing it.  It would work regardless of any control.

    So, for example, if I type “yahoo” blindly on a web page (either in a text box or even on a page without a control), it has to automatically redirect to www.yahoo.com.  You may be wondering why we need this!  But, you will be astonished to know that one of our clients asked us to implement the acceptance of keyboard based “logout” (regardless of any web page or any control they type) to immediately log out their intranet website.  They just wanted to hack the word “logout” (when the user types it) and immediately proceed to the “log out” operation.

    At the beginning, I was almost shocked when they told me their requirement. They claimed that it was a simple one! I started crying in my mind about their craziness.  We somehow implemented it using JavaScript. They were delighted.   Later they explained, almost reasonably, that “typing LOGOUT from keyboard” is much faster than “finding and clicking on logout.”  And, of course, later they asked us to implement several other keyboard based “WordHacks.”

    I request every reader to consider my apologies in explaining such a big story (without any technical content on this page).  But, I hope you have already understood the concept, on which I contributed this article.

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

    More ASP.NET Articles
    More By Jagadish Chaterjee


       · 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

    - ASP.NET DotNetNuke Installation with Visual ...
    - Using ASP.NET with a MySQL Database
    - Using ASP.NET with an MS Access Database
    - 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





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