protected void btnImageFileUpload_Click(object sender, EventArgs e) { FileUploadLibrary uploadFileLibrary = new FileUploadLibrary(); uploadFileLibrary.UploadFile(uploadImageFile, (int)FileUploadLibrary.UploadFileType.IMAGE_FILE_TYPE); if (uploadFileLibrary.SuccessFlag == true) { txtImageURL.Text = uploadFileLibrary.UploadPath; imagePreview.ImageUrl = txtImageURL.Text; } else { txtImageURL.Text = uploadFileLibrary.MessageInfo; } }
protected void btnImageFileUpload_Click(object sender, EventArgs e) { FileUploadLibrary uploadFileLibrary = new FileUploadLibrary(); uploadFileLibrary.UploadFile(uploadImageFile, (int)FileUploadLibrary.UploadFileType.NO_RESTRICT); if (uploadFileLibrary.SuccessFlag) { txtImageURL.Text = uploadFileLibrary.UploadPath; lblStatus.Text = "文件上传成功。"; } else { txtImageURL.Text = uploadFileLibrary.MessageInfo; lblStatus.Text = uploadFileLibrary.MessageInfo; } }