fabuxx.aspx.cs

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
public partial class fabuxx : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
    
      
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        // string mname = this.TextBox1.Text;
        //string mclass = this.DropDownList1.SelectedValue.ToString();
        //string mprice = this.TextBox2.Text;

        if (Page.IsValid)
        {
            Boolean fileok = false;
            string path = Server.MapPath("UploadImages/");
            if (FileUpload1.HasFile)
            {
                string fileExtension = System.IO.Path.GetExtension(FileUpload1.FileName).ToLower();
                string[] allowedExtensions = { ".gif", ".jpg", ".png", ".jpeg" };
                for (int i = 0; i < allowedExtensions.Length; i++)
                {
                    if (fileExtension == allowedExtensions[i])
                    {
                        fileok = true;
                    }
                }
            }
            if (fileok)
            {
                try
                {
                    string Addtime = DateTime.Now.ToShortDateString().ToString();
                    FileUpload1.PostedFile.SaveAs(path + FileUpload1.FileName);
                    string picpath = "UploadImages/" + FileUpload1.FileName;
                    SqlConnection con = DB.getcon();
                   // string sqlstr = "update  house  set bt='" + TextBox1.Text + "',lx='" + DropDownList1.SelectedValue + "',xq='" + TextBox2.Text + "',fx='" + TextBox3.Text + "',dj='" + TextBox4.Text + "',zj='" + TextBox5.Text + "',mj='" + TextBox6.Text + "',lc='" + TextBox7.Text + "',tel='" + TextBox8.Text + "',nd='" + TextBox9.Text + "',cx='" + TextBox10.Text + "',zx='" + TextBox11.Text + "',cq='" + TextBox12.Text + "',addtime='" + Addtime + "',contents='" + TextBox13.Text + "',imgs='" + picpath + "' where ID='" + Request.QueryString["id"] + "'";
                    string sqlstr = "insert into house values(" + " " + "'" + TextBox1.Text + "','" + DropDownList1.SelectedValue + "','" + TextBox2.Text + "','" + TextBox3.Text + "','" + TextBox4.Text + "','" + TextBox5.Text + "','" + TextBox6.Text + "','" + TextBox7.Text + "','" + TextBox8.Text + "','" + TextBox9.Text + "','" + TextBox10.Text + "','" + TextBox11.Text + "','" + TextBox12.Text + "','" + Addtime + "','" + TextBox13.Text + "','" + picpath + "','" + "0" + "','" + Session["huiyuan"] + "','1')";
                    SqlCommand cmd = new SqlCommand(sqlstr, con);
                    con.Open();
                    try
                    {
                        cmd.ExecuteNonQuery();
                        Response.Write("<script laguage='javascript'>alter('更新成功!');window.location.href('guanlixx.aspx')</script>");
                    }
                    catch (Exception e1)
后面还有 20 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。