Solved

C# Hyperlink in Gridview

Posted on 2014-01-06
3
401 Views
Last Modified: 2014-01-06
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
0
Comment
Question by:thomasm1948
  • 3
3 Comments
 

Author Comment

by:thomasm1948
ID: 39760633
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
0
 

Accepted Solution

by:
thomasm1948 earned 0 total points
ID: 39760642
I figured it out.  I added my site to the trusted sites and it worked
0
 

Author Closing Comment

by:thomasm1948
ID: 39760643
I found he solution
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

792 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question