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. Advertisements

  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. Advertisements

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. LB
    Replies:
    1
    Views:
    1,310
    Patrick Olurotimi Ige
    Apr 1, 2005
  2. =?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:
    758
    =?Utf-8?B?V2FyYW4=?=
    Aug 9, 2005
  3. =?Utf-8?B?ZGF2aWQ=?=
    Replies:
    11
    Views:
    1,207
    deandany
    Jul 17, 2006
  4. vishal
    Replies:
    1
    Views:
    777
  5. davetichenor
    Replies:
    1
    Views:
    1,103
    Eliyahu Goldin
    Oct 30, 2006
  6. Trint Smith

    Can you put an image and hyperlink in a web datagrid?

    Trint Smith, Feb 13, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    420
    Alvin Bruney [MVP]
    Feb 15, 2004
  7. Dave
    Replies:
    0
    Views:
    1,227
  8. Luiz Vianna

    Datagrid - Hyperlink Column passing URL with 2 variables

    Luiz Vianna, Jan 16, 2004, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    254
    Alessandro Zifiglio
    Jan 16, 2004
Loading...