C# TryParse05.25.2011example int age; int.TryParse(txtAge.Text, out age); test to see if integer if true, assigns age to age variable Previous post:ASP.net Validation ControlsNext post:Ajax in ASP.net