2
Answers

Print Current Date in repeater control in asp.net

Hello,
 
I am trying to print current date on repeater control .Date should be print on Label .Date is not from DataBase
I find control i.e. Label but not work my code is..
 
DateTime dt = DateTime.Now;
Label lbl = Repeater1.FindControl("lblcurrentdate") as Label;
lbl.Text = String.Format("{0:dd/MM/yyyy}", dt); 
Answers (2)