How to get clean/pure HTML from ASMX web service call
问题 I am trying to use jQuery .load() to get straight html from a asmx web service: $('#target').load('MyService.asmx/GetHtml'); In .NET code, GetHtml() returns as string: [WebMethod(EnableSession = false)] [ScriptMethod(UseHttpGet = true, ResponseFormat = ResponseFormat.Xml)] public string GetHtml() { return "<span>Hi</span>"; } That returns: <?xml version="1.0" encoding="utf-8"?> <string xmlns="http://tempuri.org/"><span>Hi</span></string> Notice that the string is encoded. With that encoding,