获取值的标签是这个
<input type="password" id="newpwd" runat="server" /></td>
点击事件的代码是这些
string name = Session["UserName"].ToString();
string pwd = newpwd.Value.ToString();
string sqlstr = "update UserInfo set Password='" + pwd + "'where Username ='" + name + "'";
SqlConnection conn = DBConnection.myconn();
conn.Open();
SqlCommand cmd = new SqlCommand(sqlstr, conn);
cmd.ExecuteNonQuery();
cmd.Dispose();
conn.Close();
为什么这段会把数据里的数据update成空啊