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(string pHeader, string pError, Page page)
{
//StringBuilder sb = new StringBuilder();
StringBuilder strScript = new StringBuilder();
strScript.Append("<script type='text/javascript' src='Scripts/jquery-1.4.1.js'>");
strScript.Append("</script>");
strScript.Append("<script type='text/javascript' src='Scripts/jquery.msgBox.js'>");
strScript.Append("</script>");
strScript.Append("<link href='Styles/msgBoxLight.css' rel='stylesheet' type='text/css'>");
strScript.Append("</link>");
strScript.Append("<script type='text/javascript'>");
strScript.Append("function example()");
strScript.Append("{");
strScript.Append("$msgBox({");
strScript.Append("title:" + pHeader + "");
strScript.Append(",");
strScript.AppendLine("content:" + pError + "");
strScript.Append("});");
strScript.Append("}");
strScript.Append("</script>");
page.ClientScript.RegisterStartupScript(page.GetType(), "Script", strScript.ToString(), true);
return strScript.ToString();
}
But this is not giving me the expected output can some one help me where I went wrong
This is the generated string builder
<script type='text/javascript' src='Scripts/jquery-1.4.1.js'></script>
<script type='text/javascript' src='Scripts/jquery.msgBox.js'></script>
<link href='Styles/msgBoxLight.css' rel='stylesheet' type='text/css'></link>
<script type='text/javascript'>
function example()
{
$msgBox({title:Testing Code,
content:Hello
});
}
</script>