Hello,
How to use validation for numeric value .
I have a div and a table generate dynamically in this div using InnerHtml.
how can prevent when any one type alphabet in dynamic textbox onmouseleave.
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
Jaganathan BantheswaranRank #170 · 14.1K reputationPosted Jan 21, 2014, 2:36 AM EST
TextBox1 txt = new TextBox();
txt.Text = "Dynamic";
txt.attributes.add("onkeypress","javscript function");
Jignesh TrivediRank #16 · 50.3K reputationPosted Jan 21, 2014, 3:26 AM EST
hi,
you can also use regex to validate the numeric data
function isNumber(v) {
return v.trim().length > 0 && v.trim().match(/^[0-9]*(\.[0-9]+)?$/);
}
hope this will help you.