Hyperlink in GridView

Discussion in 'ASP .Net' started by bbawa1@yahoo.com, Apr 25, 2007.

  1. Guest

    I have a table with two columns

    AppName AppLocation

    TestApp1 folder1
    TestApp2 folder2
    TestApp3 folder3
    TestApp4 folder4
    TestApp5 folder5

    I have to shows data of column AppName as hyperlink and when I click
    on hyperlink
    TestApp1 it should navigate to second column and go to folder1 in
    which I have
    test1.aspx page. It should open that page.

    All these folders are in another folder appsFolder.

    So Far I made a gridview and set one column as hyperlink. I bound the
    data with this gridview.
    I set the column property
    DataTextField = AppName and DataNavigateUrlFields = AppLocation.

    But it is not opening test1.aspx page which is in folder1 or folder2
    or so on.

    How can I fix this problem.

    Thanks in advance
    , Apr 25, 2007
    #1
    1. Advertising

  2. <> wrote in message
    news:...
    >I have a table with two columns
    >
    > AppName AppLocation
    >
    > TestApp1 folder1
    > TestApp2 folder2
    > TestApp3 folder3
    > TestApp4 folder4
    > TestApp5 folder5
    >
    > I have to shows data of column AppName as hyperlink and when I click
    > on hyperlink
    > TestApp1 it should navigate to second column and go to folder1 in
    > which I have
    > test1.aspx page. It should open that page.
    >
    > All these folders are in another folder appsFolder.
    >
    > So Far I made a gridview and set one column as hyperlink. I bound the
    > data with this gridview.
    > I set the column property
    > DataTextField = AppName and DataNavigateUrlFields = AppLocation.
    >
    > But it is not opening test1.aspx page which is in folder1 or folder2
    > or so on.
    >
    > How can I fix this problem.
    >
    > Thanks in advance
    >


    <asp:DataGrid ....
    <Columns>
    <asp:TemplateColumn>
    <ItemTemplate>
    <a href='<%# DataBinder.Eval(Container.DataItem,"AppLocation")
    %>/test1.aspx'><%# DataBinder.Eval(Container.DataItem, "AppName ")%></a>
    </ItemTemplate>
    </asp:TemplateColumn>
    Alexey Smirnov, Apr 25, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?bWdvbnphbGVzMw==?=

    GridView Hierarchical View - Gridview in Gridview

    =?Utf-8?B?bWdvbnphbGVzMw==?=, May 9, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    17,946
    =?Utf-8?B?UGhpbGxpcCBXaWxsaWFtcw==?=
    May 9, 2006
  2. davetichenor
    Replies:
    1
    Views:
    808
    Eliyahu Goldin
    Oct 30, 2006
  3. Keith G Hicks
    Replies:
    3
    Views:
    749
    Keith G Hicks
    Feb 18, 2008
  4. Ken
    Replies:
    1
    Views:
    363
    Alvin Bruney
    Aug 16, 2003
  5. Dave
    Replies:
    0
    Views:
    926
Loading...

Share This Page