I have two if statements and my project sees one and not the other. Here is the code:
If (IsPostBack) Then
HandleUploadedFile()
End If
Dim savePath As String = "Images\ "
If (fileUpload.HasFile) Then
Dim fileName As String = fileUpload.FileName
savePath = Server.MapPath(savePath) + fileName
fileUpload.SaveAs(savePath)
Me.Label1.Text = "Your file was saved as " & fileName
adp.Insert(fileUpload.FileName)
Me.Label1.Text = "You did not specify a file to upload."
End If
When I trace my code I find it goes to the second if and then go to end if without running the code inside the conditional.