DataGrid HyperLink Column - How can I put multiple fields in the URL field

Discussion in 'ASP .Net Datagrid Control' started by Alberto Teixeira, Jul 29, 2004.

  1. Hi everyone,

    How can I put multiple fields in the Datagrid Hyperlink Colume - URL FIELD ?

    I need to buidl an URL like:

    page.aspx?product_id={0}&seeler_id={1}

    thanks,

    Alberto
    Alberto Teixeira, Jul 29, 2004
    #1
    1. Advertising

  2. Hi everyone,

    I found a way, using TemplateColumn instead of HyperlinkColumn:

    <asp:TemplateColumn SortExpression="task_name" HeaderText="Task Name">

    <ItemTemplate>

    <asp:HyperLink id="editLink" NavigateUrl='<%#
    "./ObjectTaskDetail.aspx?object_id=" +
    DataBinder.Eval(Container.DataItem,"object_id") + "&task_id=" +
    DataBinder.Eval (Container.DataItem,"task_id") %>' runat="server" >

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

    </asp:HyperLink>

    </ItemTemplate>

    </asp:TemplateColumn>

    thanks,

    Alberto

    "Alberto Teixeira" <> wrote in message
    news:...
    > Hi everyone,
    >
    > How can I put multiple fields in the Datagrid Hyperlink Colume - URL FIELD

    ?
    >
    > I need to buidl an URL like:
    >
    > page.aspx?product_id={0}&seeler_id={1}
    >
    > thanks,
    >
    > Alberto
    >
    >
    Alberto Teixeira, Jul 29, 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. =?Utf-8?B?V2FyYW4=?=

    HyperLink Column and Button Column in a DataGrid

    =?Utf-8?B?V2FyYW4=?=, Aug 9, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    600
    =?Utf-8?B?V2FyYW4=?=
    Aug 9, 2005
  2. =?Utf-8?B?ZGF2aWQ=?=
    Replies:
    11
    Views:
    1,006
    deandany
    Jul 17, 2006
  3. vishal
    Replies:
    1
    Views:
    647
  4. davetichenor
    Replies:
    1
    Views:
    818
    Eliyahu Goldin
    Oct 30, 2006
  5. Dave
    Replies:
    0
    Views:
    935
Loading...

Share This Page