How can I bind an array to a gridview with hyperlinks?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jm

    #1

    How can I bind an array to a gridview with hyperlinks?

    Hi, I have this and it works (I get output in my gridview):

    string[] filePaths = Directory.GetFi les(@"C:\mydire ctory\", "*.pdf",
    SearchOption.Al lDirectories);
    GridView1.DataS ource = filePaths;
    GridView1.DataB ind();

    but I don't know how to turn these into links in my gridview. I tried
    a TemplateField and RowDataBound but have no idea what to put there.
    If it were a database I would just use the NavigateUrl='<% #
    Eval("mycolumn" ) %>' in the GridView, but I don't have that here.

    Thanks.
Working...