当我尝试直接在asp.net上传文件时出现以下错误
index-1.jpg (image/jpeg) - 7.72 kb (error) (In red sign)
<ajaxToolkit:AjaxFileUpload ID="imageUploader" CssClass="uploadBox" OnUploadComplete="imageuploader_onUploadComplete" ThrobberID="imagethrobber" AllowedFileTypes="jpg,jpeg,png,bmp" MaximumNumberOfFiles="1" runat="server" />
以下是我的代码。
//=========== Uploaded file format ============================
string filename = e.FileName;
//============== Upload the file ==============================
imageUploader.SaveAs("~/articleimage/"+filename);
请帮我解决这个问题。我在2010年使用visual studio 2010,.net 4和ajaxcontroltoolkit。