hi
I have datalist in product.aspx page that bind from database
and there is Repeater that bind from database... when I click on item from repeater it bind datalist...
and I define Label =LBLerrorS that when there isn't any data in database it show this message="There isn't any Product"
below are code
<asp:Label ID="LBLerrorS" runat="server" CssClass="lblerrorS" Text="there isn't any product ." Visible="false"></asp:Label>
<asp:Repeater ID="RptWood" runat="server" >
<ItemTemplate>
<li>
<a href='<%#"House.aspx?subset="+Eval("subset")+"&ID="+Eval("ID")+"&ListType="+(DataList1.Visible == true ? "Product" : "Store")%>'>
<%#Eval("subset")%></a> </li>
</ItemTemplate>
</asp:Repeater>
if (Request.QueryString["ID"] != null)
{
if (Request.QueryString["ListType"] == "Store")
{
this.GetCustomersPageWiseStore(1);
LBLerrorS.Visible = false;
}
else
{
this.GetCustomersPageWise(1);
LBLerrorS.Visible = true;
}
}
in above code I put LBLerrorS.visible=true in else condition...
problem is that whenever I select item from repeater it show lblerrors but I want it just show lblerrorS just when there isn't any data in database
actually I want when datalist is empty it show error ....
HOw I can do it?
Best Regards
NEDA