The problem is quite simple, but it's a bit harder to understand if you are a beginner.
Basically, when teh user connects to your page, the Page Load event is called, and you set the label to teh current time. When teh page is loaded completely to the user, the page dies as far as the server is concerned. When the user presses a button, a signal is sent to the server, which reloads the page from scratch, and then calls the button event handler. This means that the Page Load event is called again, so you reset the label content to the current time. The Click event ahndler is then called, and you pick up the now time again and use that.
You either need to store your "current display date" in the
Session variable[
^] or read the value from the label, and use that (There are a few other ways, but they are the easiest for beginners.) I would go with the Session - it's very, very simple to do:
private void UpdateMyLabel(DateTime dt)
{
Session["CurrentDate"] = dt;
Label1.Text = dt.ToLongDateString();
}
private DateTime GetCurrentDate()
{
return Session["CurrentDate"] == null ? DateTime.Now : (DateTime) Session["CurrentDate"];
}