Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

C# Hyperlink in Gridview

Posted on 2014-01-06
3
Medium Priority
?
418 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
High user turnover can cause old/redundant user data to consume valuable space. UserResourceCleanup was developed to address this by automatically deleting user folders when the user account is deleted.
Integration Management Part 2
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

916 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