Hi
I want in my page show current date in Label
so I put below code
DateTime datenow;
datenow=DateTime.Now;
Lbldate.Text = datenow.ToString();
in other page I used below code to convert my date according to metod
Lbldate.Text = System.Convert.ToDateTime(miladitoshamsi(_dr1["date"])).ToString(" yyyy/MM/dd");
public string miladitoshamsi(object miladi1)
{
DateTime miladi = Convert.ToDateTime(miladi1);
System.Globalization.PersianCalendar shamsi = new System.Globalization.PersianCalendar();
DateTime shamsidate = new DateTime(shamsi.GetYear(miladi), shamsi.GetMonth(miladi), shamsi.GetDayOfMonth(miladi));
return shamsidate.ToLongDateString();
}
but in above code it show date that bind from database now How I can use above code to show current date ?
thanks alot