protected void Btnsex_Click(object sender, EventArgs e) { string myname = TextBoxName.Text.Trim(); if (!string.IsNullOrEmpty(myname)) { if (LearnSite.Common.WordProcess.IsZh(myname)) { string mySnum = Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Snum"].ToString(); LearnSite.BLL.Students sbll = new LearnSite.BLL.Students(); sbll.ChangeSname(mySnum, myname); LearnSite.Common.CookieHelp.EditCookiesItem("StudentCookies", "Sname", Server.UrlEncode(myname)); System.Threading.Thread.Sleep(500); string msg = "修改姓名成功! 确定跳转"; LearnSite.Common.WordProcess.Alert(msg, this.Page); Response.Redirect("~/Student/myinfo.aspx", false); } else { Labelstr.Text = "请输入中文姓名,不能有空格!"; } } else { Labelstr.Text = "请输入你的姓名!"; } }