S
simon
I have dataRepeater.
If the column "exists" from the database is True then I would like to show
the link button, if the value is False I would like to show only the name in
label.
Something like this:
<ItemTemplate>
<%# IF Container.DataItem( "exists" ) =true then '%>
<asp:LinkButton CausesValidation=False CommandArgument='<%#
DataBinder.Eval(Container.DataItem,"tAdv_ID")%>
CommandName="AdvType" Runat="server" ID="lnkAdvType">
<%# DataBinder.Eval(Container.DataItem,"tadv_name") %>
</asp:LinkButton>
<%# else %>
<asp:label runat=server id=lblName Text='<%#
DataBinder.Eval(Container.DataItem, "tadv_name") %>'></asp:label>
<%# end if%>
</ItemTemplate>
What is the proper way to do that?
Thank you,
Simon
If the column "exists" from the database is True then I would like to show
the link button, if the value is False I would like to show only the name in
label.
Something like this:
<ItemTemplate>
<%# IF Container.DataItem( "exists" ) =true then '%>
<asp:LinkButton CausesValidation=False CommandArgument='<%#
DataBinder.Eval(Container.DataItem,"tAdv_ID")%>
CommandName="AdvType" Runat="server" ID="lnkAdvType">
<%# DataBinder.Eval(Container.DataItem,"tadv_name") %>
</asp:LinkButton>
<%# else %>
<asp:label runat=server id=lblName Text='<%#
DataBinder.Eval(Container.DataItem, "tadv_name") %>'></asp:label>
<%# end if%>
</ItemTemplate>
What is the proper way to do that?
Thank you,
Simon