public void MsgBox(System.Web.UI.Page aspxPage, string strMessage) { string strScript = "<script language=JavaScript>alert('" + strMessage +"')</script>"; if(!aspxPage.IsStartupScriptRegistered("Junipers")) aspxPage.RegisterStartupScript("Junipers", strScript); }
Page page = (Page)HttpContext.Current.Handler; MsgBox(page, "I'm a message!");
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)