WebSite1/personal_update.aspx.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
public partial class WebSite1_personal_update : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
TextBox2.Text.Trim();
TextBox3.Text.Trim();
TextBox4.Text.Trim();
string StrUpdate = "update JianLi_User set User_Mobine='"+TextBox2 .Text +"' ,Email='"+TextBox3 .Text +"',Address='"+TextBox4 .Text +"' where User_Name = '" + Session["NiName"].ToString() + "'";
string STconn = ConfigurationSettings.AppSettings["strconnection"];
SqlConnection stconn = new SqlConnection(STconn);
try
{
stconn.Open();
SqlCommand cmd = new SqlCommand(StrUpdate,stconn);
try
{
cmd.ExecuteNonQuery();
Label2.Text = "修改成功";
Label2.Visible = true;
}
catch (Exception e2) { System.Console.WriteLine(e2); }
}
catch (SqlException) { Label2.Text = "修改有误!"; Label2.Visible = true; }
}
protected void Button2_Click(object sender, EventArgs e)
{
MsnName.Text = Session["NiName"].ToString();
string STconnection = ConfigurationSettings.AppSettings["strconnection"];
string StrSql = "select* from JianLi_User where User_Name='" + Session["NiName"].ToString() + "'";
SqlConnection Strconn = new SqlConnection(STconnection);
try
{
Strconn.Open();
SqlCommand StrCmd = new SqlCommand(StrSql, Strconn);
SqlDataReader StrReader = StrCmd.ExecuteReader();
StrReader.Read();
Label1.Text = StrReader["User_Name"].ToString();
MsnName.Text = StrReader["Person_Name"].ToString();
TextBox2.Text = StrReader["User_Mobine"].ToString();
TextBox3 .Text = StrReader["Email"].ToString();
TextBox4 .Text = StrReader["Address"].ToString();
后面还有 6 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。