Link to home
Start Free TrialLog in
Avatar of zachvaldez
zachvaldezFlag for United States of America

asked on

Hyperlink does not open the file

I have this code and the hyperlink does not open the  folder/file when click. Any help is appreciated. It shows the path when hovering on the text.

                                   <td class="medium-1 left">
                                        <a href='<%# DataBinder.Eval(Container.DataItem, "FILE_LOCATION") %>' target="_blank">Open/Save</a>
                                    </td>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Miguel Oz
Miguel Oz
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of zachvaldez

ASKER

error: cannot find the path
Please post the generated html. this error states that the location is incorrect (e.g. it is not full path - you could multiple examples in the link of my previous post)
I will provide the info later but
How can I properly concatenate two DataBinders. This is causing error in NavigateURl

 <td class="medium-1 left">

                                        <asp:HyperLink ID="hlinkFile" runat="server"  NavigateUrl='<%#DataBinder.Eval(Container.DataItem, "FILE_LOCATION")%>' + '<%#DataBinder.Eval(Container.DataItem, "FILE_NAME")%>'>Open/Save</asp:HyperLink>
                                                                            </td>

Open in new window

I need to see the generated html in your browser not the asp.net construct. My suggestion is to create a property in the server that contains the valid full path, and use that to create the link
I created a folder in the server under C:\inetpub\wwwroot\AppDev\SupportDocs
I see that the files are save here.  But the hyperlink cannot open it.
generated html ??
how do I get the generated html?
Go to your browser, when page is displayed right click and select view source or use developer tools (press F12) and navigate to the element that has the info. (In Chrome Shif+ctrl +C is the shortcut to enable inspect element and you just click the desired element then the tool pane will show you the html.
I changed the folder location and it work. NO idea why. Thanks