in asp.net in textbox field want to type only numbers not characters
please help me.please send code.
Thanks,
Narasiman P
In asp.net for textbox I want to type only numbers not character.how to validate.
5 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Santhosh Kumar JayaramanRank #563 · 4.3K reputationPosted Jun 19, 2012, 9:57 PM EDT
Posted Jun 19, 2012, 10:29 PM EDT
Jignesh TrivediRank #16 · 50.3K reputationPosted Jun 19, 2012, 10:32 PM EDT
if you want to validate only numeric value then you can use RegularExpressionValidator control to validate the text box.
ControlToValidate="txtNo"
ValidationExpression="^[0-9]*$">
Also refer
http://msdn.microsoft.com/en-us/library/eahwtc9e.aspx
Hope this will help you.
Satyapriya NayakRank #47 · 31.5K reputationPosted Jun 19, 2012, 10:39 PM EDT
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Number_Chracter_validation._Default" %>
Thanks
Nattudurai EswaramurthyRank #5,536 · 296 reputationPosted Jun 19, 2012, 11:25 PM EDT
and set the property as ValidationExpression="^[0-9]*$"