Using Atlas FilteredTextBoxExtender for the convenience of users

Hi

Validation User input is very important in the Web. Although ASP.NET has a rich set of validation control we some time want to prevent a user from entering any invalid characters.

Lest say, we have a textbox control where the user needs to enter the number of products he will buy. We can always validate the value that he enters in the text box but the best thing would be if we do not allow him to enter any thing other that numeric value in the textbox.

We have a new extender in the ATLAS toolbox for such requirement (FilteredTextBoxExtender).

The code to use the FilteredTextBoxExtender looks like this.

<atlasToolkit:FilteredTextBoxExtender ID="ftbe" runat="server"> 
       
<atlasToolkit:FilteredTextBoxProperties
       
TargetControlID="TextBox3"        
       
FilterType="Custom, Numbers"
       
ValidChars="+-=/*()." />
</atlasToolkit:FilteredTextBoxExtender>


Here the TargetControlID is the Id of the button control, which will
cause the alert message. FilterType is the type of filter to be applied. This can be
a comma-separated list. The values are (Numbers, LowercaseLetters,
UppercaseLetters
, and Custom). If custom is specified the valid chars
field will also be used for other settings. ValidChars is the list of
character valid for the field. The field is only used if the custom is
specified in the filter type property.

This way we can validate user form entering any wrong data
to the field. But remember disabling the JavaScript can disable this effect so
you should use this extender as a convenience to the user but still have
validation for the data

Hope this helps
Thanks
Vikram


Share this post   Email it |  digg it! |  reddit! |  bookmark it!

Feedback

Posted on 10/26/2006 4:35:45 AM

is there any possibilities of using a single extender for more than one target control ids??????????

Posted on 8/31/2007 3:45:25 AM

Hi,
I am facing one problem. I use one textbox control with filterExtender control for numberic entry. when i try to type letters then that control work fine. but when i copy and paste letter from notepad then this control fail.
Its work fine when u paste first time. after that this control not work.

If you have any idea for this problem. please let me know.
Thanks
Uttam

Posted on 3/17/2008 5:25:59 AM

How Can Block User-Account on login attempt is fail with login control in asp.net plz help me...

Posted on 11/23/2008 11:39:32 PM

When i am using Filtertextbox control i am facing one problem that is I set All the properties of Filter text box even that is not working. I set Targetcontrol id, Filtertype. but it is not working. Please help me. i am thinking that Javascript is disabled. but i dont know Where i have to enable that option. Please help me.

Please post your comments:

Name:  
Email (optional): Your email address will not be posted.
URL (optional):
Comments: HTML will be ignored, URLs will be converted to hyperlinks  
Enter the text you see in the box:
 
Copyright © 2006 - 2009 Vikram Lakhotia