B
Bernie V
Hi group,
Is it possible to use a condition in a repeater control ?
I 'd like to use a condition to create this <a
href='<%#DataBinder.Eval(Container.DataItem,"nieuwsid")%>.aspx'> part of
the repeater
At the moment I use "nieuwsid" to make the url but in some cases it has to
be <a href='wcharts.aspx'>
Is that possible ?
This is my full repeater code at the moment:
<asp:repeater id="NewsRepeater" runat="server">
<headertemplate>
<table style="WIDTH: 144px" cellSpacing="0" cols="1"
borderColorDark="gainsboro" cellPadding="0"
width="144" borderColorLight="whitesmoke" border="0">
<TR class="Hoofdpunten">
<asp:label id="LabelNieuws" CssClass="Hoofdpunten" runat="server"
Height="12">NIEUWS</asp:label></TR>
</headertemplate>
<itemtemplate>
<tr class="DatNieuws">
<%# DataBinder.Eval(Container.DataItem,"datum","{0:dd/MM/yyyy}")%>
</tr>
<tr class="Nieuws">
<img src=".\images\icon_news.gif" align="left"> <a
href='<%#DataBinder.Eval(Container.DataItem,"nieuwsid")%>.aspx'>
<%# DataBinder.Eval(Container.DataItem,"titel")%>
</a>
</tr>
</itemtemplate>
<footertemplate>
</table>
</footertemplate>
</asp:repeater>
thx in advance !
grz
Bernie V
Is it possible to use a condition in a repeater control ?
I 'd like to use a condition to create this <a
href='<%#DataBinder.Eval(Container.DataItem,"nieuwsid")%>.aspx'> part of
the repeater
At the moment I use "nieuwsid" to make the url but in some cases it has to
be <a href='wcharts.aspx'>
Is that possible ?
This is my full repeater code at the moment:
<asp:repeater id="NewsRepeater" runat="server">
<headertemplate>
<table style="WIDTH: 144px" cellSpacing="0" cols="1"
borderColorDark="gainsboro" cellPadding="0"
width="144" borderColorLight="whitesmoke" border="0">
<TR class="Hoofdpunten">
<asp:label id="LabelNieuws" CssClass="Hoofdpunten" runat="server"
Height="12">NIEUWS</asp:label></TR>
</headertemplate>
<itemtemplate>
<tr class="DatNieuws">
<%# DataBinder.Eval(Container.DataItem,"datum","{0:dd/MM/yyyy}")%>
</tr>
<tr class="Nieuws">
<img src=".\images\icon_news.gif" align="left"> <a
href='<%#DataBinder.Eval(Container.DataItem,"nieuwsid")%>.aspx'>
<%# DataBinder.Eval(Container.DataItem,"titel")%>
</a>
</tr>
</itemtemplate>
<footertemplate>
</table>
</footertemplate>
</asp:repeater>
thx in advance !
grz
Bernie V