views:

26

answers:

1

hi, I am using jquery ajaxuploader in my asp.net website.When I set responseType: 'json' in 'AjaxUpload' the onComplete is not getting executed.In the firebug I am able to see the json response as {"Error":null,"Success":true} along with the entire page markup to which the 'AjaxUpload' has made the request.

I am having trouble understanding why the 'onComplete' is not being hit with 'responseType' set to 'json' and how can I get only the 'json' response without the entire page markup .

Could someone please help.

Update:I think the reason behind 'onComplete' not getting executed is because the browser is receiving json response along with the entire page markup(which is not json).If it is so how can I send only json response excluding the page markup?

Thanks.

A: 

I've realized where am I going wrong.I was actually sending a request to .aspx page from AjaxUpload which is the reason why i was getting the entire page markup along with the json response.I have updated AjaxUpload method to send the request to .ashx page and its working fine now.

kranthi