DateTime dt1 = DateTime.Parse(txtVrDate.Text.Trim()).Date; DateTime dt2 = DateTime.Now.Date; if ((dt2 - dt1).Days > 2) { ScriptManager.RegisterStartupScript(this, typeof(string), "myalert", "alert('InValid Date');", true); txtDate.Text = DateTime.Parse(DateTime.Now.ToShortDateString()).ToString("dd/MM/yyyy"); txtDate.Focus(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)