Hi All,
Can any one help me about How to read the JSON file in a Folder using jQuery?
I have tried like this but always my cursor going to the Failure Method.
var urlJSON = '<%=ResolveUrl("example.json") %>';
$(document).ready(function () {
$('#btnLoad').click(function () {
$.ajax({
url: urlJSON,
dataType: "json",
type: "POST",
contentType: "application/json;charset=utf-8",
success: AjaxSucceeded,
error: AjaxFailed
});
});
});
function AjaxSucceeded(result) {
alert(result.d);
}
function AjaxFailed(result) {
alert(result.status + ' ' + result.statusText);
}
If this helps you .
Please "Mark as Answer"