Hello,
How can I do an check that if there are multiple records from the method in the database then I need to change the color of an li item inside a datalist.
This is an seat reservation application, so the background color needs to be changed to red if a record is returned.
I've already done the recordcount and this works fine, however how can I use the created string inside my code behind in my datalist.
Source code:
<asp:DataList ID="DataList_tables" runat="server" RepeatLayout="Flow" SelectedItemStyle-Wrap="False" SeparatorStyle-Wrap="False" EditItemStyle-Wrap="False" EnableTheming="False" ShowHeader="False" ShowFooter="False" RepeatDirection="Horizontal" OnItemDataBound="DataList_tables_ItemDataBound">
<ItemTemplate>
<li class="<% Response.Write(color); %>"& ...
Go to the complete details ...