每次点击注册时,它提示我错误。我检查不出来有啥错的。以下是我单击注册按钮的代码 protected void Button4_Click(object sender, EventArgs e)
{
string usersex =" ";
if (RadioButton3.Checked ==true )
usersex = "男";
else
usersex = "女";
string connString = System.Configuration.ConfigurationManager.ConnectionStrings["yhzlConnectionString"].ConnectionString;
SqlConnection myConn = new SqlConnection(connString);
string sqlStr = " insert into 用户资料(用户名,密码,权限,性别,地址) values('" + txtzcName.Text.ToString() + "','" + txtzcPasswork.Text.ToString() + "','" + 0 + "','" + usersex + "','" + txtadd.Text.ToString() + "') ";
SqlCommand myCmd = new SqlCommand(sqlStr, myConn);
myConn.Open();
myCmd.ExecuteNonQuery();
myConn.Close();
}