bat文件不生效的原因--写注册表,一闪而过,没生效

版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/dieziyangfei/article/details/83178886

主要原因是bat的编码问题,要保存成asci码,否则unicode是无法运行的,

例如reg add等等,注意语法的正确性,空格什么都写对

reg add "HKEY_CURRENT_USER\Software\aaaa" /v bbbb /t REG_DWORD /d 00000001 /f

展开阅读全文

按钮没生效

08-05

protected void btnBack_Click(object sender, EventArgs e)rn rn Response.Redirect("CardMain.aspx");rn rnrnrn private new void DataBind()rn rn string Userid = Comm.SQLInjection.CheckSQLStr(Session["CardCode"].ToString());rn string Pass = Comm.SQLInjection.CheckSQLStr(Session["CardPass"].ToString());rnrn string sSQL = "";rn string mobile="";rn sSQL += " select zhonglei 卡种类, cardname 卡号,diqu 地区,btime 起始时间,etime 中止时间 ";rn sSQL += " ,xingming 姓名, sex 性别,shengfen 省份, quxian 区县, birth 生日,xueli 学历,zhiye 职业,shouru 收入,zjlb 证件类别,id_card 证件号码 ";rn sSQL += " ,home 家庭地址, home_tel 家庭电话,youbian 邮编,mobile 手机 ";rn sSQL += " ,msn MSN,icq ICQ,mail Email,gdizhi 公司地址,gwcs 购物次数,hqfs 获取方式,aihao 兴趣爱好 ";rn sSQL += " from CardBaseInfo ";rn sSQL += " where cardname='" + Userid + "' ";rn rn tryrn rn DataSet ds = Comm.SqlHelper.ExecuteDataSet(Comm.SqlHelper.ConnectionString, CommandType.Text, sSQL);rn mobile=ds.Tables[0].Rows[0]["手机"].ToString();rn if (mobile == "1" || mobile == "13888888888")rn rn labCardNo.Text = ds.Tables[0].Rows[0]["卡号"].ToString();rn txtZhongLei.Text = ds.Tables[0].Rows[0]["卡种类"].ToString();rn txtDiqu.Text = ds.Tables[0].Rows[0]["地区"].ToString();rn txtBTime.Text = ds.Tables[0].Rows[0]["起始时间"].ToString();rn txtETime.Text = ds.Tables[0].Rows[0]["中止时间"].ToString();rn txtXingMing.Text = ds.Tables[0].Rows[0]["姓名"].ToString();rn txtSex.Text = ds.Tables[0].Rows[0]["性别"].ToString();rn txtShengFen.Text = ds.Tables[0].Rows[0]["省份"].ToString();rn txtQuXian.Text = ds.Tables[0].Rows[0]["区县"].ToString();rn txtBirth.Text = ds.Tables[0].Rows[0]["生日"].ToString();rn txtXueLi.Text = ds.Tables[0].Rows[0]["学历"].ToString();rn txtZhiYe.Text = ds.Tables[0].Rows[0]["职业"].ToString();rn txtShouRu.Text = ds.Tables[0].Rows[0]["收入"].ToString();rn txtZJLB.Text = ds.Tables[0].Rows[0]["证件类别"].ToString();rn txtIDCard.Text = ds.Tables[0].Rows[0]["证件号码"].ToString();rn txtHome.Text = ds.Tables[0].Rows[0]["家庭地址"].ToString();rn txtHomeTel.Text = ds.Tables[0].Rows[0]["家庭电话"].ToString();rn txtYouBian.Text = ds.Tables[0].Rows[0]["邮编"].ToString();rn txtMobile.Text = ds.Tables[0].Rows[0]["手机"].ToString();rn txtMSN.Text = ds.Tables[0].Rows[0]["MSN"].ToString();rn txtICQ.Text = ds.Tables[0].Rows[0]["ICQ"].ToString();rn txtMail.Text = ds.Tables[0].Rows[0]["Email"].ToString();rn txtGDiZhi.Text = ds.Tables[0].Rows[0]["公司地址"].ToString();rn txtGwcs.Text = ds.Tables[0].Rows[0]["购物次数"].ToString();rn txtHqfs.Text = ds.Tables[0].Rows[0]["获取方式"].ToString();rn txtAiHao.Text = ds.Tables[0].Rows[0]["兴趣爱好"].ToString();rn rn rn catch (Exception ex)rn rn rn protected void btnSubmit_Click(object sender, EventArgs e)rn rn rn tryrn rn string Userid = Comm.SQLInjection.CheckSQLStr(Session["CardCode"].ToString());rn // string Pass = Comm.SQLInjection.CheckSQLStr(Session["CardPass"].ToString());rnrn string ZhongLei = Comm.SQLInjection.CheckSQLStr(txtZhongLei.Text.Trim());rn string Diqu = Comm.SQLInjection.CheckSQLStr(txtDiqu.Text.Trim());rn string BTime = txtBTime.Text.Trim();rn string ETime =txtETime.Text.Trim();rnrn string XingMing = Comm.SQLInjection.CheckSQLStr(txtXingMing.Text.Trim());rn string Sex = Comm.SQLInjection.CheckSQLStr(txtSex.Text.Trim());rn string ShengFen = Comm.SQLInjection.CheckSQLStr(txtShengFen.Text.Trim());rn string QuXian = Comm.SQLInjection.CheckSQLStr(txtQuXian.Text.Trim());rn string Birth = txtBirth.Text.Trim();rn string XueLi = Comm.SQLInjection.CheckSQLStr(txtXueLi.Text.Trim());rn string Zhiye = Comm.SQLInjection.CheckSQLStr(txtZhiYe.Text.Trim());rn string ShouRu = Comm.SQLInjection.CheckSQLStr(txtShouRu.Text.Trim());rn string ZJLB = Comm.SQLInjection.CheckSQLStr(txtZJLB.Text.Trim());rn string IDCard = Comm.SQLInjection.CheckSQLStr(txtIDCard.Text.Trim());rnrn string Home = Comm.SQLInjection.CheckSQLStr(txtHome.Text.Trim());rn string HomeTel = Comm.SQLInjection.CheckSQLStr(txtHomeTel.Text.Trim());rn string YouBian = Comm.SQLInjection.CheckSQLStr(txtYouBian.Text.Trim());rn string Mobile = Comm.SQLInjection.CheckSQLStr(txtMobile.Text.Trim());rnrn string MSN = Comm.SQLInjection.CheckSQLStr(txtMSN.Text.Trim());rn string ICQ = Comm.SQLInjection.CheckSQLStr(txtICQ.Text.Trim());rn string Mail = Comm.SQLInjection.CheckSQLStr(txtMail.Text.Trim());rn string GDiZhi = Comm.SQLInjection.CheckSQLStr(txtGDiZhi.Text.Trim());rn string Gwcs = Comm.SQLInjection.CheckSQLStr(txtGwcs.Text.Trim());rn string Hqfs = Comm.SQLInjection.CheckSQLStr(txtHqfs.Text.Trim());rn string AiHao = Comm.SQLInjection.CheckSQLStr(txtAiHao.Text.Trim());rnrn string sSQL = "";rn sSQL += " update CardBaseInfo ";rn sSQL += " set zhonglei='" + ZhongLei + "',diqu='" + Diqu + "',btime='" + BTime + "',etime='" + ETime + "' ";rn sSQL += " ,xingming='" + XingMing + "',sex='" + Sex + "',shengfen='" + ShengFen + "',quxian='" + QuXian + "',birth='" + Birth + "',xueli='" + XueLi + "',zhiye='" + Zhiye + "',shouru='" + ShouRu + "',zjlb='" + ZJLB + "',id_card='" + IDCard + "' ";rn sSQL += " ,home='" + Home + "',home_tel='" + HomeTel + "',youbian='" + YouBian + "',mobile='" + Mobile + "' ";rn sSQL += " ,msn='" + MSN + "',icq='" + ICQ + "',mail='" + Mail + "',gdizhi='" + GDiZhi + "',gwcs='" + Gwcs + "',hqfs='" + Hqfs + "',aihao='" + AiHao + "' ";rn //sSQL += " where cardname='" + Userid + "' and pass='" + Pass + "' ";rnrn Comm.SqlHelper.ExecuteDataSet(Comm.SqlHelper.ConnectionString, CommandType.Text, sSQL);rn Response.Write(" ");rn Response.Redirect("../loginphone.aspx");rn rn catch (Exception ex)rn rn rn rn rn rn protected void Button1_Click(object sender, EventArgs e)rn rn Response.Redirect("loginphone.aspx");rn rn rn rnrn我想问一下这个页面上的按钮为什么,点击的时候没任何反应。为什么不生效。 论坛

没有更多推荐了,返回首页