如何编写fileupload的代码是空的 [英] how to write the code for fileupload is empty
本文介绍了如何编写fileupload的代码是空的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何编写fileupload的代码为空
how to write the code for fileupload is empty
推荐答案
你可以检查FileUpload.HasFile Property [ ^ ]。
示例:
You can check FileUpload.HasFile Property[^] for that.
Example:
if(FileUpload1.HasFile)//If your fileupload control contains the file
{
//Code for upload the file.
}
else
{
//Code for showing error message.
}
--Amit
--Amit
Dim uploadControl As FileUpload = CType(gvOrderList.Rows(index).FindControl("fileUploadNm"), FileUpload)
If uploadControl.HasFile Then
End If
如果fuUpload.hasFile()那么
你的代码
否则
消息
结束如果
If fuUpload.hasFile() then
Your Code
Else
Message
End If
这篇关于如何编写fileupload的代码是空的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文