Wrox Programmer Forums
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old January 23rd, 2009, 09:03 PM
Registered User
Join Date: Jan 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Hyperlink in GridView

I am getting my text files path from Database, need to display as link in the page so that when clicked, i can see the content of the text file
Sample of my code:
protected void Page_Load(object sender, EventArgs e)

gvAttachFile.DataSource = ds;


<asp:GridView ID="gvAttachFile" runat="server" AutoGenerateColumns="False" BorderStyle="None"
BorderWidth="0" ShowHeader="False" DataKeyNames="AttachedFile" >

<asp:HyperLink ID="hlAttachedFile" NavigateUrl='<%# Eval("AttachedFile") %>' Text='<% Eval("AttachedFile") %>' runat="server" />


Similar Threads
Thread Thread Starter Forum Replies Last Post
Opening a text file using hyperlink in a gridview absu General .NET 1 March 6th, 2009 02:03 AM
HyperLink in a gridview contro to open word docmen Otoniel ASP.NET Espanol 0 October 7th, 2008 01:11 AM
Get GridView Cell Value Based on GridView Column stublair C# 2008 aka C# 3.0 0 September 4th, 2008 08:30 AM
GridView Hyperlink ki_ki ASP.NET 2.0 Professional 25 March 8th, 2007 03:30 PM
Using Hyperlink field in GridView asp_convert ASP.NET 2.0 Basics 2 February 7th, 2007 07:33 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.