File upload already in the directory but my status is Error Can anybody help me, thanks in advance..
Here's my sample Code
/////////// kendo_upload.aspx /////////////////////////////////////////////////////////////
$("#uploaded").kendoUpload({
async: {
saveUrl:"kendo_upload.aspx",
removeUrl:"remove",
autoUpload: true
},
onSuccess: onSuccess,
error: onError
});
/////////////// kendo_upload.aspx.cs /////////////////////////////////////////////////////////////////////////////
protected void Page_Load(object sender, EventArgs e)
{
ProcessRequest();
}
public void ProcessRequest()
{
Response.Expires = 1;
try
{
HttpPostedFile file = Request.Files["uploaded"];
if (file != null)
{
string savepath = Server.MapPath("~/UploadFiles/");
string filename = file.FileName;
file.SaveAs(savepath + filename);
Response.ContentType = "application/json";
Context.Response.Write("{}");
}
}
catch (Exception ex)
{
Response.Write(ex.ToString());
}
}
Here's my sample Code
/////////// kendo_upload.aspx /////////////////////////////////////////////////////////////
$("#uploaded").kendoUpload({
async: {
saveUrl:"kendo_upload.aspx",
removeUrl:"remove",
autoUpload: true
},
onSuccess: onSuccess,
error: onError
});
/////////////// kendo_upload.aspx.cs /////////////////////////////////////////////////////////////////////////////
protected void Page_Load(object sender, EventArgs e)
{
ProcessRequest();
}
public void ProcessRequest()
{
Response.Expires = 1;
try
{
HttpPostedFile file = Request.Files["uploaded"];
if (file != null)
{
string savepath = Server.MapPath("~/UploadFiles/");
string filename = file.FileName;
file.SaveAs(savepath + filename);
Response.ContentType = "application/json";
Context.Response.Write("{}");
}
}
catch (Exception ex)
{
Response.Write(ex.ToString());
}
}