//1.添加
String userName = txtUserName.Text;
String Pwd = txtPwd.Text;
String strSql = "insert into b_User (UserName,Pwd) values('" + userName + "','" + Pwd + "')";
SqlConnection con = new SqlConnection(ConfigurationManager.AppSettings["SQLConnString"].ToString());
SqlCommand com = new SqlCommand();
con.Open();
com.Connection = con;
com.CommandText = strSql;
int exeResult = com.ExecuteNonQuery();
Response.Write(exeResult);
con.Close();
2. //删除
string strSql = "delete from b_user ";
SqlConnection con = new SqlConnection(ConfigurationManager.AppSettings["SQLConnString"].ToString());
con.Open();
SqlCommand com = new SqlCommand(strSql,con);