I need to escape a double quote in inline c# within javascript. Code is below:
if (\"<%= TempData[\"Message\"]%>\" == \"\") { // code };
Call HttpUtility.JavaScriptStringEncode. This method is new to ASP.Net 4.0; for earlier versions, use the WPL.