protected void lbtnApply_Click(object sender, EventArgs e) { if (ddlCategory.SelectedItem.Value == "0") { gvProductList.DataSource = products.GetProduct(); } else { gvProductList.DataSource = products.GetProductByCID(int.Parse(ddlCategory.SelectedItem.Value)); } gvProductList.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ddlClassMenu.DataSource = products.GetProductByCID(5); ddlClassMenu.DataBind(); Bind(int.Parse(lbPID.Text)); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { //helper.GetdataSet("select * from Products where CategoryID=2"); ddlClassMenu.DataSource = products.GetProductByCID(3); ddlClassMenu.DataBind(); Bind(int.Parse(lbPID.Text)); } }