How do I form this ASP:Hyperlink object?

Discussion in 'ASP .Net' started by jm, Jan 16, 2004.

  1. jm

    jm Guest

    [snippet from datagrid]
    <td>

    <asp:HyperLink id="ORDER_ID" NavigateUrl= '<%#
    DataBinder.EvalContainer.DataItem, "ORDER_ID")%>' runat="server">

    <%# DataBinder.Eval(Container.DataItem, "ORDER_ID") %>

    </asp:HyperLink>

    </td>

    I can get the database item to show up in the link, but of course
    that's it here. I want to put a real link like:

    NavigateURL=http://localhost/virtualdirectory/thepage.aspx?item=THE_DATABASE_ITEM

    but if I form the object this way I get a string, not a link with the
    database item.

    I need a link with the database item. If you can help, it is
    appreciated. Thank you.
     
    jm, Jan 16, 2004
    #1
    1. Advertising

  2. jm

    Guogang Guest

    NavigateUrl= '<%# DataBinder.EvalContainer.DataItem, "ORDER_ID",
    "http://localhost/virtualdirectory/thepage.aspx?item={0})" %>'


    "jm" <> wrote in message
    news:...
    > [snippet from datagrid]
    > <td>
    >
    > <asp:HyperLink id="ORDER_ID" NavigateUrl= '<%#
    > DataBinder.EvalContainer.DataItem, "ORDER_ID")%>' runat="server">
    >
    > <%# DataBinder.Eval(Container.DataItem, "ORDER_ID") %>
    >
    > </asp:HyperLink>
    >
    > </td>
    >
    > I can get the database item to show up in the link, but of course
    > that's it here. I want to put a real link like:
    >
    >

    NavigateURL=http://localhost/virtualdirectory/thepage.aspx?item=THE_DATABASE
    _ITEM
    >
    > but if I form the object this way I get a string, not a link with the
    > database item.
    >
    > I need a link with the database item. If you can help, it is
    > appreciated. Thank you.
     
    Guogang, Jan 16, 2004
    #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. Big E

    Form database contents hyperlink

    Big E, Jul 7, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    418
    Eliyahu Goldin
    Jul 8, 2004
  2. Martin Dew
    Replies:
    4
    Views:
    14,101
    Martin Dew
    Jul 21, 2004
  3. davetichenor
    Replies:
    1
    Views:
    884
    Eliyahu Goldin
    Oct 30, 2006
  4. Ken
    Replies:
    1
    Views:
    405
    Alvin Bruney
    Aug 16, 2003
  5. Dave
    Replies:
    0
    Views:
    978
Loading...

Share This Page