TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Insert Only Digits In TextBox
hardik deshani
May 23, 2012
5.2
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
Insert Only Digits In TextBox using Windows Application.
*Insert This Code In Windows App. Text box Key Press Event*
private void textBox4_KeyPress(object sender, KeyPressEventArgs e)
{
if (char.IsDigit(e.KeyChar))
{
}
else if (e.KeyChar == '\b')
{
}
else
{
e.Handled = true;
}
}
Insert Only Digits In TextBox
Next Recommended Reading
Validating Email ID in TextBox in C# .Net