读书人

请问 有关问题 个人信息修改 修

发布时间: 2013-06-19 10:26:41 作者: rapoo

请教 问题 —— 个人信息修改 修改不了
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{


string id = TextBox1.Text;
string cellphone = TextBox5.Text;
string name = TextBox6.Text;
string socialNum = TextBox7.Text;
string email = TextBox8.Text;
string sex = DropDownList1.SelectedValue.ToString();
string zipcode = TextBox9.Text;
string address = TextBox10.Text;

string SQL = "UPDATE users SET u_name='" + name + "',u_cellphone='" + cellphone + "',";
SQL += "u_socialNum='" + socialNum + "',u_email='" + email + "',u_sex='" + sex + "',u_zipcode='" + zipcode + "',u_address='" + address + "' WHERE u_id='" + id + "';";


SqlConnection conn = new SqlConnection(connectionString);
SqlCommand cmd = new SqlCommand(SQL, conn);

conn = new SqlConnection(connectionString);
cmd = new SqlCommand(SQL, conn);
SqlDataReader rd;

try
{
conn.Open();
rd = cmd.ExecuteReader();
rd.Read();
Response.Write("<script>alert('?? ???????!!!');</script>");
rd.Close();

}
catch (Exception error)
{
Response.Write("<script>alert('?? ???????!!!');</script>");
}
finally
{
conn.Close();
}



点解修改按钮时 页面就变成个空白页面 这个修改函数部分哪里错了呢 谢谢 帮帮看下


[解决办法]
Response.Write("<script>alert('?? ???????!!!');</script>");
有这么调用脚本的么?
用Page.ClientScript
[解决办法]
还是韩文的、、、
[解决办法]

 

读书人网 >asp.net

热点推荐