I have a gridview that returns values from a directory path such as :
<table width="40%" border="0" style="margin-left:auto; margin-right:auto;">
<tr>
<td align="center">
<asp:GridView ID="gvFileList" runat="server" AutoGenerateColumns="false" AllowSorting="true">
<columns>
<asp:boundfield datafield="Name" headertext="File Name"/>
<asp:boundfield datafield="Extension" headertext="File Type"/>
<asp:boundfield datafield="Length" headertext="Length"/>
<asp:boundfield datafield="LastCreateTime" headertext="Date"/>
</columns>
</asp:GridView>
</td>
</tr>
</table>
How can I get the values under the "Name" column to have a url similar to "javascript:OpenSecure('abcd.doc')
?
Update: Given the HTML code below, I am unable to see the hyperlink in the Name field.
<asp:GridView ID="gvInvoiceList" runat="server" AutoGenerateColumns="false" AllowSorting="true">
<columns>
<asp:TemplateField HeaderText="Name">
<ItemTemplate><asp:Hyperlink ID="acctInvoiceRpt" NavigateUrl='<%# SetNavigateUrl(Eval("Name")) %>' runat="server"></asp:Hyperlink><%#Eval("Name")%></ItemTemplate>
</asp:TemplateField>
<asp:boundfield datafield="Extension" headertext="File Type"/>