if(GridView1.RowCount == 0) { lblError.Text = "Record is empty"; }
if(GridView1.Rows.Count == 0) { lblError.Text = "Record is empty"; }
<asp:GridView ID="GridView1" runat="server" EmptyDataText="Record is empty" />
<emptydatatemplate>Record is empty </emptydatatemplate>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)