Try this
string str = "12/10/2014";
string strFormat = "dd/MM/yyyy";
DateTime x;
DateTime y;
TryParseDate(str,strFormat,out x)
TryParseDate(DateTimeNow.ToString("dd/MM/yyyy"),strFormat,out y))
if(x > y)
{
lblErrMsg.text =" the entered date greater then current date" ;
}
private bool TryParseDate(string str,string strFormat, out DateTime result)
{
if(!String.IsNullOrEmpty(str))
{
return DateTime.TryParseExact(str,strFormat,new CultureInfo("en-US"),DateTimeStyles.None,out result)
}
else
{
result = new DateTime(); return false;
}
}