//Type this code on the KeyPress event of the textbox
private void textBox_KeyPress(object sender, KeyPressEventArgs e)
{
if (char.IsDigit(e.KeyChar) == true)
MessageBox.Show("You can't type a numeric values");
}
This article shows that when a user type a numeric value it will give an error...
//Type this code on the KeyPress event of the textbox
private void textBox_KeyPress(object sender, KeyPressEventArgs e)
{
if (char.IsDigit(e.KeyChar) == true)
MessageBox.Show("You can't type a numeric values");
}
Join the conversation! Your thoughts help the community grow.
Join to leave a comment
Members earn 10 SHARP for a comment, 10 SHARP for a reaction, and 250 SHARP for every blog they publish.
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegisterMembers onlyFeatured eBookClaude for AI-Native BuildersDownload nowWrite a blog post and earn +250 SHARP when it is approved.
Write a blog
Mike GoldTOP 100Posted May 14, 2009, 11:18 AM EDT
what happens when you try to paste a character into the textbox?
chandra mohanPosted May 10, 2009, 8:58 PM EDT
hi frinds hierarchy gridview2.0 version ..plz any body help this is very urgent.