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, Jul 29, 2004
    #2
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.