Hi
I made a small change in your condition. Please check this
da.Fill(ds);
if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
{
lblError.Text = "Dataset table contains data";
}
else
{
lblError.Visible = true;
lblError.Text = "Dataset does not contains data";
}