【发布时间】:2014-11-28 07:49:21
【问题描述】:
为简单起见:
客户:
var xrh = new XmlHttpRequest();
...
xrh.onerror = on_upload_error;
xrh.send(...)
服务器:
public class file_transfer
{
[HttpPost]
public void Upload(HttpPostedFileBase[] files_to_upload)
{
...
if (succeeded)
{
// what should I to to let the client know the success? in onload
}
else
{
// what should I to to let the client know the failaure? maybe in onerror
}
}
}
我应该怎么做才能让客户知道成功?正在加载中?
我应该怎么做才能让客户知道失败?可能是onerror?
【问题讨论】:
标签: javascript ajax asp.net-mvc upload