Thanks I do have a little bit of experience with VB.NET and have written a few small programs. In fact I have created this program in .Net and now trying to make a web version of it
I have been reading and watching video tutorials over at the ASP.NET site. There is a video on page life cycle that I am going to watch in a little bit
Here is my code:
Code:
Protected Sub upload_Button_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles upload_Button.Click
If FileUpload1.HasFile Then
Try
FileUpload1.SaveAs("C:\Uploads\" & _
FileUpload1.FileName)
Label1.Text = "File name: " & _
FileUpload1.PostedFile.FileName & "<br>" & _
"File Size: " & _
FileUpload1.PostedFile.ContentLength & " kb<br>" & _
"Content type: " & _
FileUpload1.PostedFile.ContentType
Catch ex As Exception
Label1.Text = "ERROR: " & ex.Message.ToString()
End Try
Else
Label1.Text = "You have not specified a file."
End If
End Sub
This works fine and does save the file.
I now want ot be able to access the file for my TextFieldParser, this is where I am stuck
Code:
Protected Sub Button1_Click1(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim str As String = ("F:\email\emailtest.txt") I have to hard code the file
ReadTable2(str)
I wanted to be able to do something like
str = Fileupload1.FileName