AsyncFileUpload.HasFile
单击上传按钮时获取空值。这是我的代码。
protected void ASF_personalDocs_UploadedComplete
(object sender, AjaxControlToolkit.AsyncFileUploadEventArgs e)
{
if (ASF_personalDocs.HasFile)
{
//upload file
string directoryPath = Server.MapPath("~\\uploads\\SharedDocs\\" + Session["username"].ToString().ToLower());
string pathNameWithFile = directoryPath + "\\" + e.filename.ToLower();
}
}
protected void btnUploadPD_Click(object sender, EventArgs e)
{
string title = txtPDTitle.Text;
labPDTitleErr.Text = "";
if (title != "" && **ASF_personalDocs.HasFile**)
{
//code goes on
}
}
用 上传文件后AsyncFileUploader
,当我单击上传按钮时,ASF_personalDocs.HasFile
值为false
。