Allow only certain characters in textbox in asp.net
TargetControlID:give your textbox id
ValidChars:which characters, we need to allow in text box ,there are given like this ValidChars=”1234567890ar.”
Example:
<asp:TextBox ID=”txtamt” runat=”server”AutoPostBack=”True”></asp:TextBox>
<cc1:FilteredTextBoxExtender ID=”FTEamt” runat=”server” TargetControlID=”txtamt” ValidChars=”1234567890.”> </cc1:FilteredTextBoxExtender>
*Note:FilteredTextBoxExtender is an Ajax control
Posted on August 5, 2011, in Uncategorized. Bookmark the permalink. Leave a Comment.
Leave a Comment
Comments (0)