Hi,
Guys if u are entering a text in text box to check if it is number or string there is a java script function as follows:
function CheckIsNumber(evt) {
evt = (evt) ? evt : window.event;
var charCode = (evt.which) ? evt.which : evt.keyCode;
if (charCode > 31 && (charCode <> 57)) {
alert("This field accepts numbers only.");
return false
}
return true
}
Call this function at textbox event :
asp:TextBox ID="txt_CreditNoteAmt" onkeypress="return CheckIsNumber(event);" AutoPostBack="true" runat="server" Width="50" Enabled="false" OnTextChanged="txt_CreditNoteAmt_Changed"
No comments:
Post a Comment