I open a Dialog/popupwindow when I click on a button:
string popupScript= "<script language='javascript'>" +
"window.showModalDialog('MyDialog.aspx', null, " +
"' DialogHeight=300px; DialogWidth=600px;')" +
"</script>";
Page.RegisterStartupScript("PopupScript", popupScript);
In MyDialog.aspx in the Page_load I have:
Label1.Text=DateTime.Now.ToLongTimeString();
This works fine.
But... next time I open the Dialog, Label1 still shows the time from the first time I clicked on it.
What to do? Why is Page_load not triggered?
string popupScript= "<script language='javascript'>" +
"window.showModalDialog('MyDialog.aspx', null, " +
"' DialogHeight=300px; DialogWidth=600px;')" +
"</script>";
Page.RegisterStartupScript("PopupScript", popupScript);
In MyDialog.aspx in the Page_load I have:
Label1.Text=DateTime.Now.ToLongTimeString();
This works fine.
But... next time I open the Dialog, Label1 still shows the time from the first time I clicked on it.
What to do? Why is Page_load not triggered?