Hi,
Only Possible way is check Data table row count
string a = DropDownList1.SelectedValue.ToString();
SqlConnection con = new SqlConnection(connstring);
string query="SELECT * FROM ['ISB VAS Nodes$'] WHERE Model='"+DropDownList1.Text+"'";
SqlDataAdapter da = new SqlDataAdapter(query, con);
DataTable dt = new DataTable();
da.Fill(dt);
if(dt.rows.Count>0)
{
GridView1.DataSource = dt;
GridView1.DataBind();
}
else
{
lblResult.Text = "No Records Found";
}
And You may Add below code to gridview design for display Empty message
<emptydatatemplate>
No Records Found
</emptydatatemplate>
When execute this, If you Got this message - that Means DB Table does not Contain Records, that match to your query
Thanks
Siva Rm K