How to make dynamically created textbox to accpet only input?
I have dynamically created Textbox but not able to make it accept only numbers.How to do that?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sam HobbsPosted Oct 9, 2011, 10:34 PM
{
base.OnKeyPress(e);
string keyInput = e.KeyChar.ToString();
if (Char.IsDigit(e.KeyChar))
{
return;
}
if (e.KeyChar == '\b')
{
return;
}
e.Handled = true;
}
jasbirsingh chauhanPosted Oct 10, 2011, 8:46 AM
VulpesPosted Oct 9, 2011, 5:55 AM