ObjectDataSource row counts
protected void odc_Selected(object sender, ObjectDataSourceStatusEventArgs e) { int rowCount = ((xDataTable)e.ReturnValue).Count; if (rowCount < 1) lblMessage.Text = "No rows found"; else lblMessage.Text = rowCount + " rows found"; }