Template column;
<ItemTemplate>
<asp:HyperLink runat="server"
Text='<%# DataBinder.Eval(Container,"DataItem.TextField") %>'
NavigateUrl='<%# BuildUrl(
(int)DataBinder.Eval(Container,"DataItem.IntField" ),
(string)DataBinder.Eval(Container,"DataItem.String Field") ) %'>
</asp:HyperLink>
</ItemTemplate>
Code behind;
protected string BuildUrl( int field1, string field2 )
{
// TODO - Do whatever you need to do to build your Url
return string.Format( "{0}?field1={1}&field2={2}", baseUrl, field1, field2
);
}
"LmcE" wrote:
Hi,
I have created a datagrid with a template column containing a datalist.
However, I need the text within the datalist to display as a hyperlink. Eack
of the links will point to another form with 2 parameters passed in.
Has anyone any ideas how to add the hyperlink?
Many Thanks