How to validate textbox to accept only numeric value in C#.net


 Below Coding for accept only Numbers.....


      if ((e.KeyChar < 48 || e.KeyChar > 57) && e.KeyChar != 8)
            {
                e.Handled = true; // Remove the character
                MessageBox.Show("Please Enter No only...");
            }

Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

0 comments: on "How to validate textbox to accept only numeric value in C#.net"

Post a Comment