I want the user to use DD MM YYYY format and numeric like 12 02 2014.For testing.I entered a string in the month field but it is not throwing error.My input was 12 sx 2014.
Can someone shed some light on this.
if (dobMonth.Text == String.Empty || !Int32.TryParse(dobMonth.Text, out intParsed))
{
valid = false;
dobMonth.CssClass = "error";
ErrDOB.Visible = true;
}
else
{
}

Michal HabalcikRank #902 · 2.3K reputationPosted Jan 1, 2015, 8:38 PM EST
or are you merging the contents of the textboxes into some local variable (or invisible text box)?