textbox validation please help urgent
i have a textbox in windows form. i need to validate it for integer values. i have tried using the regular expressions as follow.
Regex userNameMatch= new Regex("[0-9]*");
if(!userNameMatch.IsMatch(txtUserName.Text))
{
..........
}
i am trying to accomplish that if the user is not entering any value , including symbols such as " !@#$%^&*()" other than a number it should throw a message.
it would be great if any body could please help me out in this.
Regards
AKSSMV
|