if (last column (cnt) is greater than 5> ) { response.write ("6"); }
SELECT id, category, ( SELECT COUNT(id) FROM entry_table WHERE category.id = entry_table.Cat_id) as cnt FROM category
<asp:Repeater ID="CloudTags" runat="server" OnItemDataBound="CloudTags_ItemDataBound"> <ItemTemplate> <asp:HyperLink ID="HyperLink9" runat="server"> <%#DataBinder.Eval(Container,"DataItem.Category")%> (<%#DataBinder.Eval(Container,"DataItem.cnt")%>) </asp:HyperLink> </ItemTemplate> </asp:Repeater>
protected void CloudTags_ItemDataBound(object sender, RepeaterItemEventArgs e) { }
ItemDataBound
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem){ MyCount += Convert.ToInt32(DataBinder.Eval(e.Item.DataItem, "column_name")); //MyCount is variable which is declared globaly }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)