public static string ShowAlertMessage(string pHeader, string pError) { StringBuilder strScript = new StringBuilder(); strScript.Append("<script type=\"text/javascript\" src=\"").Append("Scripts/jquery-1.4.1.js").Append("\"></script>"); strScript.Append("<script type=\"text/javascript\" src=\"").Append("Scripts/jquery.msgBox.js").Append("\"></script>"); strScript.Append("<link rel=\"stylesheet\" type=\"text/css\" href=\"").Append("Styles/msgBoxLight.css").Append("\" />"); strScript.Append("<script type=\"text/javascript\">"); strScript.Append("function example()"); strScript.Append("{"); strScript.Append("$.msgBox({"); strScript.Append("title:'" + pHeader + "'"); strScript.Append(","); strScript.Append("content:'" + pError + "'"); strScript.Append("});"); strScript.Append("}"); strScript.Append("</script>"); return strScript.ToString(); }
ClientScript.RegisterStartupScript(this.GetType(), "Popup", Alert.ShowAlertMessage("Hello", "Welcome"), true);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)