Esempio n. 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["IsValid"] == null)
        {
            Response.Redirect("../Login.aspx");
        }
        if (this.IsPostBack == false)
        {
            DALProduct obj = new DALProduct();
            DataSet    ds  = obj.ProductList_Load();

            ddlCategory.DataTextField  = "CategoryName";
            ddlCategory.DataValueField = "CategoryCode";
            ddlCategory.DataSource     = ds.Tables[0];
            ddlCategory.DataBind();

            BindProducts();
        }
    }