In this web-healer.blogspot.com's web programming tutorial we will learn that how we can show simple date and time on our web page in asp.net using c#. just copy and paste the below code.
if (!Page.IsPostBack)
{
lbl_date.Text = DateTime.Now.ToLongDateString();
TxtDateTo.Text = DateTime.Today.ToString("MM/dd/yyyy");
}
Tags:
asp.net