public void ProcessRequest (HttpContext context) {
        context.Response.ContentType = "text/html";
        int qid = Convert.ToInt32(context.Request["id"]);
        string str = ConfigurationManager.ConnectionStrings["connStr"].ConnectionString;
        string sql = "delete t_users where [email protected]";
        using(SqlConnection conn=new SqlConnection (str))
        using (SqlCommand cmd = new SqlCommand(sql, conn))
        {
            cmd.Parameters.Add(new SqlParameter("@id", qid));
            conn.Open();
            cmd.ExecuteNonQuery();
        }
        context.Response.Redirect("/index.ashx");

    }

一般处理程序,网页数据删除

点击确定删除数据

一般处理程序,网页数据删除

删除完成。

相关文章:

  • 2021-08-28
  • 2021-09-14
  • 2021-08-28
  • 2022-03-01
  • 2021-05-30
  • 2021-07-31
猜你喜欢
  • 2021-12-09
  • 2021-05-22
  • 2021-12-28
  • 2022-12-23
  • 2021-10-18
  • 2021-05-17
  • 2021-07-23
相关资源
相似解决方案