Javascript With In Stringbuilder
This code I converted as per needed http://jquerymsgbox.ibrahimkalyoncu.com/ Hi all I have written the following code to display an alert public static string ShowAlertMessage(stri
Solution 1:
Got the answer with this
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();
}
Post a Comment for "Javascript With In Stringbuilder"