RigEssedeSics
New Member
I make a Json call to an ashx handler like this:\[code\] attributes = $("#pageHtmlTag").attr("class").trim();urlToHandler = 'JSonTestHandler.ashx';jsonData = 'http://stackoverflow.com/questions/12598533/{' + attributes + '}';$.ajax({ url: urlToHandler, data: jsonData, dataType: 'json', type: 'POST', contentType: 'application/json', success: function (data) { setAutocompleteData(data.responseDateTime); $("body").add("<div>" + data.toString() + " </div>").appendTo(document.body); alert("grate suceees"); }, error: function (data, status, jqXHR) { alert('There was an error.' + jqXHR); }}); // end $.ajax \[/code\]I receieve it and proccess it. I also want to send back some HTML to be displayed but i dont know how to send html back to the Jscript.ashx:\[code\] string jsonData = http://stackoverflow.com/questions/12598533/new StreamReader(context.Request.InputStream, System.Text.Encoding.UTF8).ReadToEnd();............................. var testResultReportString = testResultReport.GetReportHtml(); var serializer = new JavaScriptSerializer(); var jSonTestResultReport = serializer.Serialize(testResultReportString); context.Response.Write(jSonTestResultReport);\[/code\]So the question is. How do i return data to the Ajax calls success function?