I'm trying to save html into a JS variable
var popupBody = '<%= MyContext.Current.DynamicProperties.FirstOrDefault(p => p.PropertyName == "PopupModalBody").PropertyValue %>';
Above code will try to store html returned by C# to a JS variable (popupBody) but it returns Syntax Error in the console because the html is not in a single line. How can I achieve this? Thanks for any help.
PropertyValue.Replace("\r\n","")