I often use the Page.RegisterStartupScript in an event handler to write a
javascript alert that can be based on a condition allows the entire page
loads before the alert pops up...very handy for me...
(note, this method also makes the message tablerow visible and writes to a
literal control in that row)
private void UserMessage(string Message, bool Popup)
{
StatusMessage.Text=Message;
ShowMessage.Visible=true;
if (Popup)
{
Page.RegisterStartupScript("StatusMessage","<SCRIPT
LANGUAGE=\"JavaScript\">alert('"+ Message +"');</Script>");
}
}