in

dotNetFreak

Ramblings & Controls from a .NET Addicted Freak!

Kevin Gearing's Blog

June 2007 - Posts

  • StringCompareValidator v2.0.1 Released

    StringCompareValidator v2.0.1 has been released. Click here for details.
  • CasedTextBox v2.0.1 Released

    CasedTextBox v2.0.1 has been released. Click here for details.
  • StringCompareValidator for .NET 2.0 Released

    If like me you've made use of the standard CompareValidator you'll know that it lacks one important feature for comparing strings - Case sensitivity. Whilst working on another control I needed a compare validator that had this capability, so I've created my own custom control - StringCompareValidator.

    Features:

    • CaseSensitive property to allow case-sensitive or case-insensitive comparisons.
    • CompareOperator property to allow equal or not equal comparisons.
    • Provides client-side and server-side validation.
    • Tested in IE6 & IE7 (PC), IE5 (Mac), FireFox 2 (PC & Mac), Safari 2 (Mac), Safari 3 (PC), Opera 9 (PC). 
    • Full Visual Studio .NET designer integration.
    • Works in a 'ViewState Disabled' environment. 
    • Compatible with Medium Trust environments.

    Simple Online Demo
     

    Usage:

    Simply download, add to your toolbox, drag 'n' drop to your page and set the relevant properties using the property grid.


    Licensing & Download:

    Free for both personal and commercial use, however please consider donating!

    You may also redistribute the control royalty free, providing that you don't charge for it. Also, if you intend to distribute the control as part of an application which is publicly available it would be nice to know, although this isn't a requirement.

    To download, please visit the 'Downloads' area.


    Help & Support:

    Please post in the forum.

     

    Revision History: 

    Updated 11/07/2007 (v2.0.2):

    • JavaScript is now embedded as an include rather than outputted into the Web page.
    • ViewState is no longer used to persist property values so the control works in a ViewState disabled environment.

    Updated 07/06/2007 (v2.0.1):

    • Few minor code tweaks.
    • Added demo page to archive.
    Updated 05/06/2007 (v2.0.0):
    • Recompiled under .NET 2.0.
    • Now runs in a medium trust environment.
    • Help now compiled with Sandcastle.

    For the previous .NET 1.1 version, please click here.

  • CasedTextBox for .NET 2.0 Released

    Unlike Windows Forms.NET, ASP.NET textbox controls seem to be missing the 'Character Casing' property which allows you to define the case of characters entered within a textbox.

    Whilst it's fairly easy to replicate by hooking up some JavaScript to the 'onblur event', e.g.

    txtEMailAddress.Attributes.Add("onblur", "this.value = this.value.toLowerCase();");

    it becomes a bit of a pain having to enter this on every page. So, below is a simple ASP.NET control that basically does it for you. It simply inherits from the standard TextBox class and adds a new 'Character Casing' property allowing you to set the character case to one of three options:


    Features:

    • CharacterCasing property to set the case to upper (all characters uppercase), upper first (only the first character uppercase) or lower (all characters lowercase).
    • Tested in IE6 & IE7 (PC), IE5 (Mac), FireFox 2 (PC & Mac), Safari 2 (Mac), Safari 3 (PC), Opera 9 (PC).
    • Full Visual Studio .NET designer integration.
    • Works in a 'ViewState Disabled' environment. 
    • Compatible with Medium Trust environments.

    Simple Online Demo


    Usage:

    Simply download, add to your toolbox, drag 'n' drop to your page and set the property using the property grid.


    Licensing & Download:

    Free for both personal and commercial use, however please consider donating!

    You may also redistribute the control royalty free, providing that you don't charge for it. Also, if you intend to distribute the control as part of an application which is publicly available it would be nice to know, although this isn't a requirement.

    To download, please visit the 'Downloads' area.


    Help & Support:

    Please post in the forum.

     

    Revision History: 

    Updated 11/07/2007 (v2.0.2):

    • Control failed to change the character case in some browsers - Fixed.
    • JavaScript is now embedded as an include rather than outputted into the Web page.
    • ViewState is no longer used to persist property values so the control works in a ViewState disabled environment.

    Updated 07/06/2007 (v2.0.1):

    • UpperFirst now converts the first character of every word to uppercase (ideal for addresses).
    • Few minor code tweaks.
    • Added demo page to archive.
    Updated 05/06/2007 (v2.0.0):
    • Recompiled for .NET 2.0.
    • Now runs in a medium trust environment.
    • Help now compiled with Sandcastle.

    For the previous .NET 1.1 version, please click here.

Copyright ©2004-2007 Kevin Gearing. All Rights Reserved.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems