Posted on: 10/13/2015 2:05:27 AM | Views : 968

Greetings,
Hopefully, this is not a difficult request.
The code below is used to upload files.
It restricts the file type a user must upload.
It also restricts the size a user must upload.
Finally, it forces file overwrite.
All this is great but there is one change I am having problem making.
We would like to remove the requirement that a user must upload a file.
In other words, we want to make uploading a file optional. This way, a user can save records to the database without uploading a file to the server.
How do I accomplish this?
Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubmit.Click 'Get path from web.config file to upload Dim FilePath As String = ConfigurationManager.AppSettings("FilePath").ToString() Dim blSucces As Boolean = False Dim filename As String = String.Emp ...

Go to the complete details ...