V
VB Programmer
I am using a FileUpload control (ASP.NET 2.0). How do I check the length of
the file in bytes BEFORE I let them upload it?
I believe my code checks now AFTER...
If FileUpload1.PostedFile.ContentLength >
ConfigurationManager.AppSettings("MaxVideoUploadSize") Then
lblErr.Text = "File needs to be > 0 bytes and less than " &
ConfigurationManager.AppSettings("MaxVideoUploadSize") / 1000000 & " MB."
Exit Sub
End If
the file in bytes BEFORE I let them upload it?
I believe my code checks now AFTER...
If FileUpload1.PostedFile.ContentLength >
ConfigurationManager.AppSettings("MaxVideoUploadSize") Then
lblErr.Text = "File needs to be > 0 bytes and less than " &
ConfigurationManager.AppSettings("MaxVideoUploadSize") / 1000000 & " MB."
Exit Sub
End If