public void QuickSearchproduct123() { ds100 = quicksearch.select_product_type(); if (ds100.Tables[0].Rows.Count != 0) { for (int k = 0; k <= ds100.Tables[0].Rows.Count - 1; k++) { example = Convert.ToString(ds100.Tables[0].Rows[k]["product_type"].ToString()); int z = Convert.ToInt32(ds100.Tables[0].Rows[k]["company_id"].ToString()); string[] me = example.Split(','); int i; for (i = 0; i <= me.Length - 1; i++) { Label3.Visible = false; try { if (me[i] == DropDownList7.SelectedItem.Text) { try { quicksearch.get_company_id = z; ds = quicksearch.companysearch(); if (ds.Tables[0].Rows.Count != 0) { Label3.Visible = false; GridView dg = new GridView(); dg.AllowPaging = true; dg.PageSize = 50; dg.Width = 50; dg.Height = 50; dg.DataSource = ds; dg.DataBind();
Panel5.Visible = true; Panel5.Controls.Add(dg); flag = 1; } else { // Page.ClientScript.RegisterStartupScript(this.GetType(), "msg", ""); Panel5.Visible = false; } } catch (Exception ex) { } } else { } }
catch (Exception ex) { // Page.ClientScript.RegisterStartupScript(this.GetType(), "msg", ""); } } if (flag==0) { //Page.ClientScript.RegisterStartupScript(this.GetType(), "msg", ""); Panel5.Visible = false; } PagedDataSource page = new PagedDataSource(); page.AllowPaging = true; } } else { // Page.ClientScript.RegisterStartupScript(this.GetType(), "msg", ""); } if (flag == 0) { Page.ClientScript.RegisterStartupScript(this.GetType(), "msg", "");
Panel5.Visible = false; }
} ..................call this method in the button click event.......... here i take a panel and make this false in property........ pageload() {if (!IsPostBack) {} Panel5.Visible = false;
}
|
No responses found. Be the first to respond and make money from revenue sharing program.
|