private void BindGridData() { try { con.Open(); string menuid = Application["MenuId"].ToString(); { string sql = "select * from rsa_ProductItemTable where MenuId=" + menuid; SqlCommand cmd = new SqlCommand(sql, con); SqlDataAdapter da = new SqlDataAdapter(sql, con); DataSet ds = new DataSet(); da.Fill(ds); DataList1.DataSource = ds; DataList1.DataBind(); } } catch (Exception ex) { } finally { con.Close(); } }
<FooterTemplate> <asp:Label Visible='<%#bool.Parse((DataList1.Items.Count==0).ToString())%>' runat="server" ID="lblNoRecord" Text="No Record Found!"></asp:Label> </FooterTemplate>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)