Link to home
Start Free TrialLog in
Avatar of thomasm1948
thomasm1948Flag for United States of America

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-HorizontalAlign="Left" >               
                <ItemTemplate>
                    <asp:hyperlink ID="HID" runat="server" Text='<%# Bind("CD_Name") %>'
                  NavigateUrl='<%# DataBinder.Eval(Container.DataItem,"FilePath") %>' Target="_blank"></asp:hyperlink>
                </ItemTemplate>

       <HeaderStyle HorizontalAlign="Left"></HeaderStyle>
     </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
Avatar of thomasm1948
thomasm1948
Flag of United States of America image

ASKER

The following is a sample link that is in the gridview:

file:\\EPRMS\PImages$\001appSQL\Notice%20of%20Personnel%20Action.jpg


if I copy it to the run command, it works.  In visual studios it works as well
ASKER CERTIFIED SOLUTION
Avatar of thomasm1948
thomasm1948
Flag of United States of America 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
I found he solution