I am new to asp.net. I want to know that how to put client validation on .aspx file?
Like; value in text box is numeric or not, you must have to enter the value in text box and so on. Please, help me for this issue.
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Vijay YadavRank #1,637 · 943 reputationPosted Mar 1, 2011, 9:33 PM EST
Krishna GaradRank #191 · 12.8K reputationPosted Mar 1, 2011, 9:07 PM EST
http://www.c-sharpcorner.com/UploadFile/puranindia/ValidationControlsASPNET09232009023348AM/ValidationControlsASPNET.aspx
Sahil Jani196 reputationPosted Mar 1, 2011, 9:13 PM EST
Krishna GaradRank #191 · 12.8K reputationPosted Mar 1, 2011, 9:18 PM EST
One more article is this for your requirment check out
http://www.c-sharpcorner.com/UploadFile/purankaushal/103222006013805AM/1.aspx
Sahil Jani196 reputationPosted Mar 1, 2011, 9:25 PM EST
Sahil Jani196 reputationPosted Mar 1, 2011, 10:46 PM EST
Vijay YadavRank #1,637 · 943 reputationPosted Mar 1, 2011, 11:50 PM EST
For backspace and number, you can use this:
isNumeric = (keyCode >= 48 && keyCode <= 57 ) || keyCode == 8;
Suthish NairRank #92 · 22.8K reputationPosted Mar 2, 2011, 12:11 AM EST
Vijay YadavRank #1,637 · 943 reputationPosted Mar 2, 2011, 12:18 AM EST
yes and thanks to you for providing the code, it helps everyone here.