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

A

Alberto Teixeira

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
 
A

Alberto Teixeira

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
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top