private void Button1_Click(object sender, System.EventArgs e)
{
cn = new SqlConnection(ConfigurationSettings.AppSettings["ds"]);
string strSQL="select * from user_info where user_id="+UserName.Text;
cm = new SqlCommand(strSQL,cn);
cn.Open();
dr = cm.ExecuteReader();
if(dr.Read())
{
Response.Write("<script>window.alert('数据库中已经有这个用户!');</script>");