Last post Aug 17, 2009 04:34 AM by rmdw
Aug 17, 2009 04:34 AM|rmdw|LINK
I don't know about you, but up until now, whenever I wanted to display a message to the user from server-side code, I'd call a method like this:
public static void ShowMessage(Page page, string msg)
ScriptManager.RegisterStartupScript(page, page.GetType(), Guid.NewGuid().ToString(), "alert('" + msg + "');", true);
This is fine but the major drawback is that the user must press the OK button of the Alert box. Sometimes this is appropriate but many times it is not.
So I set about to build a "subtle" messagebox, one that fades away if the user doesn't press OK in a specified period of time. I've
documented it here.
Hoping this will help others too!