Beispiel #1
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            context.Response.ContentType = "text/html";
            int id = Convert.ToInt32(context.Request["id"]);

            Sqlhelper1.ExecuteScalar("delete from student where id=@id", new SqlParameter("@id", id));
            context.Response.Write("<script>confirm('删除成功');location.href = '../aspx/my_info.aspx';</script>");
        }
Beispiel #2
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            context.Response.ContentType = "text/html";
            string id      = context.Request["id"];
            string keys    = context.Request["keys"];
            string name    = context.Request["name"];
            string xingbie = context.Request["xingbie"];
            string age     = context.Request["age"];

            Sqlhelper1.ExecuteScalar("delete from student where id=@id", new SqlParameter("@id", id));
            Sqlhelper1.ExecuteScalar("insert into student (id,keys,name,xingbie,age)values (@id,@keys,@name,@xingbie,@age)", new SqlParameter("@id", id), new SqlParameter("@keys", keys), new SqlParameter("@name", name), new SqlParameter("@xingbie", xingbie), new SqlParameter("@age", age));
            context.Response.Write("<script>confirm('修改成功');location.href = '../aspx/my_info.aspx';</script>");
        }
Beispiel #3
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            // context.Response.Write("Hello World");
            context.Response.ContentType = "text/html";
            string str2 = context.Request["use1"];
            string str3 = context.Request["password4"];
            string str4 = context.Request["password5"];
            string str5 = context.Request["password6"];
            string str6 = context.Request["password7"];
            string str7 = context.Request["password8"];

            if (str3 != str4)
            {
                context.Response.Write("<script>alert('两次输入密码不一致!!');location.href = 'register.ashx';</script>");
            }
            else
            {
                Sqlhelper1.ExecuteScalar("insert into student (id,keys,name,xingbie,age)values (@id,@keys,@name,@xingbie,@age)", new SqlParameter("@id", str2), new SqlParameter("@keys", str3), new SqlParameter("@name", str5), new SqlParameter("@xingbie", str6), new SqlParameter("@age", str7));
                context.Response.Write("<script>alert('注册成功 ');location.href = '../html/login.html';</script>");
            }
        }