求助。。。。。。!
向数据库表中提交信息无法实现,程序既不报错也不提交执行。代码如下:string ConnString = System.Configuration.ConfigurationSettings.AppSettings["case"];
//从<AppSettings>节读取连接字符串
SqlConnection sqlcon = new SqlConnection(ConnString);//创建SqlConnection对象
sqlcon.Open();
SqlCommand defendbase = new SqlCommand();
into Defend_information values (@Num_regist,@Defend_status_parties,@Defend_type,@Defend_name_parties,@Defend_add_parties,@Defend_postal_code,@Defend_phone)";
defendbase.Parameters.Add("@Num_regist",Num_registTextBox.Text.ToString());
defendbase.Parameters.Add("@Defend_status_parties",this.StatusDropDownList.SelectedItem.Value);
defendbase.Parameters.Add("@Defend_type",this.TypeDropDownList.SelectedItem.Value);
defendbase.Parameters.Add("@Defend_name_parties",Name_partiesTextBox.Text.ToString());
defendbase.Parameters.Add("@Defend_add_parties",Add_partiesTextBox.Text.ToString());
defendbase.Parameters.Add("@Defend_postal_code",Postal_codeTextBox.Text.ToString());
defendbase.Parameters.Add("@Defend_phone",PhoneTextBox.Text.ToString());
defendbase.Connection = sqlcon;
defendbase.ExecuteNonQuery();
Response.Write("<script>alert('提交成功!')</script>");
请大家帮忙!