I’m making ajax request to generic handler to get the list of json strings.
$.ajax({
type: "POST",
url: "MyHandler.ashx",
data: "{}",
contentType: "text/plain",
dataType: "text",
success: function (jsonList) {
var myArray = new Arrary();
myArray = jsonList;
var jsonObject1 = JSON.parse(myArray[0]);
}
MyHandler.ashx
public void ProcessRequest (HttpContext context)
{
context.Response.ContentType = "text/plain";
List<string> allstrings = new List<string>();
allstrings = (List<string>)context.Application["allstrings"];
context.Response.Write(allstrings);
}
I’m not sure about content type & data type to be used here. The request never reach to success function.
try this