Friday, September 25, 2009

Javascript optional parameters

Wednesday, September 09, 2009

Numeric only , windows programing , C#.Net

If you want to restrict a text box, to enter only numeric values.
Just do the following in the KeyPress event.

private void txtOpenCount_KeyPress(object sender, KeyPressEventArgs e)
{
string str = "\b0123456789";
e.Handled = !(str.Contains(e.KeyChar.ToString()));
}

My Achievements

Member of

Blog Archive

Followers