file open with web app

  • Thread starter Thread starter Paul
  • Start date Start date
P

Paul

Hi I am able to upload files to a server with a .net web application. The
problem is I am providing a hyperlink so the user can open the file after it
is placed on the server. For the URL I am using the absolute path to the
file and setting this dynamically after the file is uploaded. For the
hyperlink I have the target set to _blank. When clicking on the hyperlink
nothing happens, wondering if I need to use a file open control and if there
is one with .net 2005?
thanks!
 
I located the open file dialog in the toolbox but it is not enabled.
Wondering if this control only works for windows apps!--
Paul G
Software engineer.
 
thanks for the response, that seems to be the problem.
string abstpath = Server.MapPath(newpath + FileUpload1.FileName);
"C:\\folder1\\folder2\\filename"
Do you know if there is an easy way to get the path in the http format?
Guess it is possible to convert the path with the C:\\ to the correct one
with string.replace.


--
Paul G
Software engineer.


Patrice said:
Absolute path that is ? Use "view source" to check exactlly whihc lcoation
is used in your HTML markup. Make sure it looks like
"http://mysite/mydir/myfile.doc" not "c:\serverdir\myfile.doc" that doesn"t
make sense client side).

For the same reason using an open dialog wouldn't make sense The client
can't see directly the server drive.
 
got it working, just used ~/folder/filename.
--
Paul G
Software engineer.


Patrice said:
Absolute path that is ? Use "view source" to check exactlly whihc lcoation
is used in your HTML markup. Make sure it looks like
"http://mysite/mydir/myfile.doc" not "c:\serverdir\myfile.doc" that doesn"t
make sense client side).

For the same reason using an open dialog wouldn't make sense The client
can't see directly the server drive.
 
Back
Top