hi
i have search button in my page this is my behind code
protected void search_Click(object sender, ImageClickEventArgs e)
{
SqlConnection _cn = new SqlConnection(System.Web.Configuration.WebConfigurationManager.ConnectionStrings["behtopConnectionString"].ConnectionString);
SqlCommand _cmd = new SqlCommand("Exec First_Search @Key", _cn);
_cmd.Parameters.AddWithValue("@Key", txtsearch.Text);
_cn.Open();
SqlDataReader _dr = _cmd.ExecuteReader();
if (_dr.HasRows)
{
DataList1.DataSource = _dr;
DataList1.DataBind();
}
_cn.Close();
}
i have lable in my page that Label1.Visible = false;
I want when user click on search button if there isn't any result == Label1.Visible = True;
and it show my lable
how i can do it?