Forum Moderators: open
I'm really kicking myself for this one. I've gone through all my books and searched the web but I just can't find the solution to this one. I am writting ASP.net (VB) and need to check if my datalist (populated from an Access db via a DataSet) is empty. If it is, I want to display a message where the content should be. Any pointers will be helpful.
Many Thanks
Chris
sComm2 = "SELECT CategoryName, "
sComm2 += "CategoryDescription, "
sComm2 += "ParentCategory "
sComm2 += "FROM Categories "
sComm2 += "WHERE CategoryID = " & Request.QueryString("Category")oConn2 = New OleDbConnection(sConn)
oComm2 = New OleDbDataAdapter(sComm2, oConn2)oComm2.Fill(oDataSet2, "CategoryInfo")
oGrid2.DataSource=oDataSet2.Tables("CategoryInfo").DefaultView
oGrid2.DataBind()...
...
...<asp:DataList id="oGrid2" runat="server">
<ItemTemplate>
<strong><%# DataBinder.Eval(Container.DataItem, "CategoryName") %></strong> - (<a href="directory.aspx?category=<%# DataBinder.Eval(Container.DataItem, "ParentCategory") %>">category up</a> )<br />
<%# DataBinder.Eval(Container.DataItem, "CategoryDescription") %>
</ItemTemplate>
</asp:DataList>