views:

169

answers:

2

Hi,

I want my TextBoxExtender to NOT allow a comma and a slash. How do I set it ? Using an escape sequence ?

Thanks.

+2  A: 

I think you are looking for the InvalidChars Element. The FilteredTextBoxExtender can be set to filter either Valid or Invalid Characters.

   <ajaxToolkit:FilteredTextBoxExtender ID="MyId" runat="server"
        TargetControlID="TextBoxName"         
        FilterType="Custom"
        FilterMode="InvalidChars"
        InvalidChars="Your Charcters" />

Reference

EDIT no you can just add all your characters you want to exclude

InvalidChars="`~!@#$%^&*()_-+=[]{}:;',.<>/? "
cgreeno
A: 

Yes , but i also wanted to know how to include a comma in the set - it needs an escape sequence right ? Like Invalidchars="H,\,".

Chakra