Hi,
File upload contole
Protected Sub FileUpload1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles FileUpload1.Load
If FileUpload1.HasFile Then
Label1.Text = "Received " & FileUpload1.FileName & " Content Type " & FileUpload1.PostedFile.ContentType & " Length " & FileUpload1.PostedFile.ContentLength
Else
Label1.Text = "Upload file"
End If
End Sub
Upload Button:
If FileUpload1.PostedFile Is Nothing Then
Me.Label1.Text = "No File Selected to Upload."
Exit Sub
End If
strName = System.IO.Path.GetFileName(FileUpload1.PostedFile. FileName)
Try
FileUpload1.PostedFile.SaveAs("Path" + strName)
Me.Label1.Text = """" + strName + """ was uploaded successfully."
Catch ex As Exception
Me.Label1.Text = "An Error Occured While Uploading File."
End Try
Here i am able to upload the html file, But i want to show or open the uploaded file by clicking InputView Button, in the same web page Bottom or a pop up window. and i am unable catch the file name which one am i uploading. i want to catch the file name and have2 store in a string and have2 use in other buttons in same web page.
I don't see what the problem is - what have you tried?