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

 

About aravindmcse

I am aravinda kumar my native is komarapalayam, it located at nearest of erode.now I working in Chennai as software engineer

Posted on August 5, 2011, in Uncategorized. Bookmark the permalink. Leave a Comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.