update.aspx.cs
(完整代码) 1KBusing System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
public partial class update : System.Web.UI.Page
{
SqlConnection con;
protected void Page_Load(object sender, EventArgs e)
{
string str = "Data Source=.;Initial Catalog=Book;Integrated Security=True";
con = new SqlConnection(str);
}
protected void Button1_Click(object sender, EventArgs e)
{
con.Open();
string sqlstr = "update bookus set Bno='" + TextBox2.Text + "',bname='" + TextBox3.Text + "',writer='" + TextBox4.Text + "',money='" + TextBox5.Text + "' where Bid='9'";
SqlCommand com = new SqlCommand(sqlstr, con);
com.ExecuteNonQuery();
Response.Redirect("update.aspx");
con.Close();
}
protected void Button2_Click(object sender, EventArgs e)
{
Response.Redirect("index.aspx");
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。