Home All Groups Group Topic Archive Search About
Author
22 Nov 2005 4:50 PM
Phenom
In my app, I want to create a link from a field in a database, which
will always be a file path. I have bound the hyperlink to the db field.
I have set in code, the navigate.url  to be the value I retrieve from
the dataset. Currently, I can see the path in the link and when I click
on it, IE will display the text 'start downloading from....' with the
path I expect to see. However, nothing is happening.

Here is the code I have with two different ways I have tried to set the
navigate.url property. Am I missing something? Is there a better way to
do this?

Thanks
hlinkImplement.DataBind()
            ' hlinkImplement.NavigateUrl =
RTrim(DsUpdate1.Tables(0).Rows(0)("doc_implement"))
            hlinkImplement.NavigateUrl = "file://" &
RTrim(DsUpdate1.Tables(0).Rows(0)("doc_implement"))

Author
22 Nov 2005 7:15 PM
Elton W
NavigateUrl is not physical file path. It's virtual path.  You should
transfer physical path to virtual path. Or you can use Response.WriteFile to
show it in browser.

BTW, the question is not data related. You should post it in aspnet group.

HTH

Elton Wang

Show quote
"Phenom" wrote:

> In my app, I want to create a link from a field in a database, which
> will always be a file path. I have bound the hyperlink to the db field.
> I have set in code, the navigate.url  to be the value I retrieve from
> the dataset. Currently, I can see the path in the link and when I click
> on it, IE will display the text 'start downloading from....' with the
> path I expect to see. However, nothing is happening.
>
> Here is the code I have with two different ways I have tried to set the
> navigate.url property. Am I missing something? Is there a better way to
> do this?
>
> Thanks
> hlinkImplement.DataBind()
>             ' hlinkImplement.NavigateUrl =
> RTrim(DsUpdate1.Tables(0).Rows(0)("doc_implement"))
>             hlinkImplement.NavigateUrl = "file://" &
> RTrim(DsUpdate1.Tables(0).Rows(0)("doc_implement"))
>
>

AddThis Social Bookmark Button