Hi,
You can use AJAX FilterTextBoxExtender to filter the characters entered in the textbox.
Here is the sample code for you
<asp:ScriptManager ID="SM1" runat="server"></asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:TextBox ID="txtNumeric" runat="server"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FTBE_txtNumeric" runat="server" FilterType="Numbers" TargetControlID="txtNumeric"></ajax:FilteredTextBoxExtender>
<br />
<asp:TextBox ID="txtAlphabet" runat="server"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FTBE_txtAlphabet" runat="server" FilterType="UppercaseLetters,LowercaseLetters" TargetControlID="txtAlphabet"></ajax:FilteredTextBoxExtender>
</ContentTemplate>
</asp:UpdatePanel>
You can follow the below link for more queries
http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/FilteredTextBox/FilteredTextBox.aspx[
^]
Happy coding :)
Regards,
Manoj