Пример #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Class1 loadData = new Class1();
            loadData.ReadData("select LargePhoto from Production.ProductPhoto where ProductPhotoID='69'");


            ListBox1.DataSource = loadData.sqlDataTable;
            
            ListBox1.DataTextField = "ProductPhotoID";
            ListBox1.DataBind();
            //DropDownList1.DataSource = loadData.sqlDataTable;
            //DropDownList1.DataTextField = "Name";
            ////DropDownList1.DataValueField = "";
            //DropDownList1.DataBind();
        }
Пример #2
0
 protected void Button3_Click(object sender, EventArgs e)
 {
     Class1 delete = new Class1();
     delete.InsertUpdateDelete("delete from Production.ProductCategory Where Name='"+DropDownList1.SelectedValue +"'");
 }
Пример #3
0
 protected void Button2_Click(object sender, EventArgs e)
 {
     Class1 saveData = new Class1();
     saveData.InsertUpdateDelete("insert into Production.ProductCategory(Name) values ('" + TextBox1.Text.ToString() + "')");
 }