Wednesday, August 20, 2008

Accept Only Numbers In Text Box

//This javascript can be used to accept only numbers in any text box in asp.net





//After Adding this script to souce code please add the following statement on pageLoad event to register the java script to text box named txtRs



txtRs.Attributes.Add(”onkeydown”, “JavaScript:return isNumericKeyPressed();”);

No comments: