Beispiel #1
0
        protected void Button3_Click(object sender, EventArgs e)
        {
            string        cs  = ConfigurationManager.ConnectionStrings["DBConnection"].ConnectionString;
            SqlConnection con = new SqlConnection(cs);

            con.Open();
            Shopping shopping = new Shopping
            {
                ProductName = TextBox1.Text
            };

            dlProduct.DataSource = null;
            dlProduct.DataSource = shopping.Search();
            dlProduct.DataBind();
            ClearText();
            con.Close();
        }