Solved

C# Hyperlink in Gridview

Posted on 2014-01-06
3
395 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
Comment Utility
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
Comment Utility
I figured it out.  I added my site to the trusted sites and it worked
0
 

Author Closing Comment

by:thomasm1948
Comment Utility
I found he solution
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

771 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now