thomasm1948
asked on
C# Hyperlink in Gridview
Hi
I have an issue where I have stored file paths (folder share on another server) in a SQL database. I am able to create the hyperlink on the gridview and it works from Visual Studios but when I publish it, the link do not work (nothing happens)
below is how I create the hyperlink
<Columns>
<asp:TemplateField HeaderText="Document" HeaderStyle-HorizontalAlig n="Left" >
<ItemTemplate>
<asp:hyperlink ID="HID" runat="server" Text='<%# Bind("CD_Name") %>'
NavigateUrl='<%# DataBinder.Eval(Container. DataItem," FilePath") %>' Target="_blank"></asp:hype rlink>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left"></H eaderStyle >
</asp:TemplateField>
</Columns>
I am not sure what I am doing wrong I am using IIS 7.0
Thank you for your help in advance
I have an issue where I have stored file paths (folder share on another server) in a SQL database. I am able to create the hyperlink on the gridview and it works from Visual Studios but when I publish it, the link do not work (nothing happens)
below is how I create the hyperlink
<Columns>
<asp:TemplateField HeaderText="Document" HeaderStyle-HorizontalAlig
<ItemTemplate>
<asp:hyperlink ID="HID" runat="server" Text='<%# Bind("CD_Name") %>'
NavigateUrl='<%# DataBinder.Eval(Container.
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left"></H
</asp:TemplateField>
</Columns>
I am not sure what I am doing wrong I am using IIS 7.0
Thank you for your help in advance
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I found he solution
ASKER
file:\\EPRMS\PImages$\001a
if I copy it to the run command, it works. In visual studios it works as well