Absolute path to url?

J

js

Hi,

I have stored the absolute file path in a grid, and want if user click it,
will redirect to the virtual path and download the file:

Dim fileName As String = articleList.DataKeys(e.Item.ItemIndex)

Response.Redirect(fileName, True)



But failed, how to recirect to the link? Thanks.
 
J

js

Thanks Steven,

I got this error:
Invalid path for child request
'C:\MyServer\Users\debug\Portals\0\Users\host\Hello1.doc'. A virtual path is
expected.

The path is right. How to fix it?
 
J

Juan T. Llibre

re:
A virtual path is expected.
The path is right. How to fix it?

No. The path is *not* right.
Your web users will never find a path in your file system.

You need to use a virtual path which your web users can access.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,125
Latest member
VinayKumar Nevatia_
Top