我有这个代码
lblSignFile.Visible = False
oSDR = objDB.CreateSDRFromSQLSelect("select signfile from appuserdtl where uid ='" & sUID & "'")
Dim chkFile As New IO.FileInfo(oSDR.ToString)
If chkFile.Exists() = True Then
lblSignFile.Visible = True
lblSignFile.Text = "Yes"
ElseIf chkFile.Exists() = False Then
lblSignFile.Visible = True
lblSignFile.Text = "No"
End If
End If
我想在数据库sql server中插入后检查文件..然后在asp.net的表单中我想要显示带有组件标签的文件的状态..请帮助..
关于arif pratama
答案 0 :(得分:0)
您可以使用File
命名空间中System.IO
类的Exists方法确定指定的文件是否存在:
bool System.IO.File.Exists(string path)
在您的代码中尝试此操作....并检查