I self taught myself VB.NET a couple of months ago so I'm still pretty new at this. I was looking at a way to launch/open a pdf file. I was looking at the FileStream functions but it seemed more appropriate for reading in text when all I need was to actually open a file with the right application based on the file extension. So I came across System.Diagnostics.Process
and it worked perfectly. Until I moved the application up to a web server that is. I guess the new process is actually being run on the server rather than on the client side. Is there a way to do something similar on the client?
Dim myProcess As System.Diagnostics.Process = New System.Diagnostics.Process()
Dim location As String
location = "W:\SomeFileShare\Stuff.pdf"
myProcess.StartInfo.FileName = location
myProcess.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal
Catch ex As Exception
lblError.Visible = True
lblError.Text = "File Not Found - Please make sure you have entered the correct information."