关于sql注入
SqlCommand cmd = new SqlCommand("select * from WARE where warename='" + TextBox1.Text + "'", conn);  这个可以SQL注入,明白。
//SqlCommand cmd = new SqlCommand("jian", conn);          
         //cmd.CommandType = CommandType.StoredProcedure;  
         //cmd.Parameters.AddWithValue("a", TextBox1.Text);   这句话什么意思?
后面注释的三句话是如何做到防止SQL注入的呢?
------解决方案--------------------