In classic ASP.NET, it's fairly easy to use handlers (IHttpHandler):
context.Response.ContentType = "application/json"
context.Response.Clear()
context.Response.AddHeader("Pragma", "no-cache")
context.Response.AddHeader("Expires", "-1")
context.Response.Write(myJsonString)
In your markup, use the following jQuery code:
$.ajax({
type: "GET",
url: "GetTasksForTaskSet.ashx?tasksetid=" + guid,
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(data) {
for(var i = 0; i < data.length; i++) {
// do something
},
error: function(){ alert('error'); }
});