"Jos" <jo***************@fastmail.fm> schreef in bericht
news:ON**************@TK2MSFTNGP10.phx.gbl...
Arjen wrote:
What I forgot to say is that I want to set the hyperlink control with
a value from the current row.
How can I do that?
Put this inside the <ItemTemplate>:
<asp:HyperLink runat="server" Text='<%#
DataBinder.Eval(Container.DataItem,"fieldname") %>'></asp:HyperLink>
This will set the Text property of the HyperLink,
but you can set other properties in the same way.
Search for help on DataBinder to find more advanced formatting options.
--
Jos
The problem is a little bit more complex, the data value is an integer that
I have to change to some text.
Example:
intNumber is comming out of the database and strValue must be set inside the
hyperlink control.
if intNumber = 1 then the strValue = "High" else strValue = "Low".
How can I do this inside code behind?
Thanks!