ASP.NET
  Home arrow ASP.NET arrow ASP.NET Custom Server Controls: Extended W...
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: Extended Wordhack Control with Key Combination
By: Jagadish Chaterjee
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 9
    2005-11-21

    Table of Contents:
  • ASP.NET Custom Server Controls: Extended Wordhack Control with Key Combination
  • Did any Attributes change from the previous article?
  • Did any JavaScripts change from the previous article?
  • Combining with the “Ctrl” key!
  • Summary

  • 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: Extended Wordhack Control with Key Combination


    (Page 1 of 5 )

    This article further extends my previous article on “WordHack control” (belonging to the same series) with a few more enhancements, together with a flexible and understandable approach to JavaScript code. It even introduces a new “CharacterHack” control to hack the keys with a “Ctrl” combination.
    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 are the new properties?

    Since I already explained the “WordHack” control in my previous article, I don’t want to tell stories any more (as I injected a story of mine in my previous article).  Coming straight to the point, the previous control works fine for only a single “WordHack.”  But it doesn’t work for more than one “WordHack."  You might also wonder “why don’t you support special keys (like combinations using the “Ctrl” key) within the WordHack?”

    Before you ask those questions, I am enhancing the previous control with this new updated one, which supports any number of “WordHacks” in your web page.  So, let us start with our new updated control.

    Apart from some of the properties (like isDesignTime(), Word2Hack(), RedirectURL() and so on) in my previous article, I have added one more new property as follows:

    Public Property OrderOfPreference() As String
            Get
                Return viewstate("OrderOfPreference") & ""
            End Get
            Set(ByVal Value As String)
                viewstate("OrderOfPreference") = Value
            End Set
        End Property

    The above is the main important property which is used to maintain an “Order of Preference” (something like a serial number starting from 0).  Why is this property necessary?  If we want to hack three words, which one comes first?  That is why I use the “OrderOfPreference” property. 

    The “OrderOfPreference” for the first control (or instance) should always be 0 and contine increasing (with the only interval being one) for each new instance of the same control, if they are on the same web page.  This creates an index of all words (or characters) to be hacked, and I conquer them in JavaScript.

    More ASP.NET Articles
    More By Jagadish Chaterjee


       · Hello guys...an improved version of WorkHack control...enjoy
     

    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