I have a FileUpload control on my web page that isn't populating the control like it should. It looked pretty straight forward in doing this but obviously I'm doing something wrong. I'm testing this in my IIS so my Server.MapPath value is "C:\inetpub\wwwroot\MWP\Images\Img1.jpg". Here is my code below:
Protected Sub btnUpload_Click(sender As Object, e As System.EventArgs) Handles btnUpload.Click
Try
Dim strFileName As String = ""
Session("filePath") = Server.MapPath("/MWP/Images/") & FileUpload1.FileName
FileUpload1.SaveAs(Session("filePath"))
img1.ImageUrl = Session("filePath")
Catch ex As Exception
strMsg = "btnUpload_Click() - " & ex.Message
End Try
End Sub