window.open To reference a Shared File

Steve_Dusty

New member
Joined
Apr 18, 2005
Messages
4
Programming Experience
1-3
I'm trying to reference a new browser page to a shared file, but I'm getting an error when the new page opens.

The code I'm using is:
window.open('File://networkcomputer//Sharedfolder//testdocs//document.pdf')


Thanks
 

jmcilhinney

VB.NET Forum Moderator
Staff member
Joined
Aug 17, 2004
Messages
14,322
Location
Sydney, Australia
Programming Experience
10+
You could use Process.Start(<file path>) to open the default application for that file type. That will open the default PDF viewer in your case. You could use Process.Start("iexplore", <file path>) to (try to) open any file in Internet Explorer. If you want to ensure you use the default browser, I believe you will have to delve into the registry to determine what it is. I have read that there is a section in the registry that keeps a list of installed browsers and e-mail clients and which is the default, but I can't remember the details. A search on the Microsoft web site should turn it up if that's what you need.
 
Top Bottom