Im using FineUploder to upload an image to web server.
javascript
function createUploader() {
var thumbnailuploader = new qq.FineUploader({
element: $('#thumbnail-fine-uploader')[0],
request: {
endpoint: '<%= ResolveUrl("~/Common/uploadhandler.ashx") %>'
},
multiple: false,
...
callbacks: {
onComplete: function (id, fileName, responseJSON) {
if (responseJSON.success) {
$('#imgPreview').html('<img src="../Uploaded/' + filename + '" alt="' + filename + '">');
}
}
}
});
}
window.onload = createUploader;
javascript calls Serverside uploadhandler.ashx
, and uploads the file successfully .
public void ProcessRequest(HttpContext context)
{
.....
context.Response.ContentType = "application/json";
context.Response.Write("{\"success\":true}");
}
Here I need to return another parameter with the json response. How to add another parameter to context.Response.Write("{\"success\":true}");
and read it from the javascript 'onComplete' method