I have a html file contains html:
<html>
<body>
<div class="infoLabel">*Your order has been placed in production queue</div><br />
<div class="infoLabel">*The order confirmation will be delivered to you shortly</div>
</body>
</html>
In .net C# code behind I write the following codes to convert the html to string and pass to Javascript:
string path = Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory.ToString(), "Templates/SiteNotifications/SavedQuote.html");
string htmlBody = File.ReadAllText(path);
ScriptManager.RegisterStartupScript(Page, GetType(), "changePriceList" + Guid.NewGuid(),"displayViewDetails(" + htmlBody + ");", true);
I found the htmlBody contains the string with proper escape. The Script is:
function displayViewDetails(currentOrder) {
var w = window.open('_blank', "NewWindow", "width=" + width + ", height=" + height);
w.document.open();
w.document.write(currentOrder);
w.document.close();
}
However, when debugging I found there is error for the Javascript to parse the html. I don't how to correct pass the html for the Javascript to parse. I found the existing posts don't seem to solve my problem. Anyone can help?

displayViewDetails