private void FillProducts()
        {
            try
            {
                SqlCommand cmd = new SqlCommand("Home_Product_List", con);
                cmd.CommandType = CommandType.StoredProcedure;


                SqlDataAdapter da = new SqlDataAdapter();
                DataTable      dt = new DataTable();

                cmd.Parameters.Add("@catid", SqlDbType.NVarChar);
                cmd.Parameters["@catid"].Value = Convert.ToInt32(Request.QueryString["id"].ToString());

                da.SelectCommand = cmd;
                da.Fill(dt);

                DL_Products.DataSource = dt;
                DL_Products.DataBind();
            }
            catch (Exception ee)
            {
                throw ee;
            }
        }
Example #2
0
        private void FillProducts()
        {
            try
            {
                SqlCommand cmd = new SqlCommand("Home_category_List", con);
                cmd.CommandType = CommandType.StoredProcedure;


                SqlDataAdapter da = new SqlDataAdapter();
                DataTable      dt = new DataTable();

                da.SelectCommand = cmd;
                da.Fill(dt);

                DL_Products.DataSource = dt;
                DL_Products.DataBind();
            }
            catch (Exception ee)
            {
                throw ee;
            }
        }