Manage/upload.aspx.cs

(开头部分) 4KB

这里只显示每个文件的开头 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 upload : System.Web.UI.Page
{
   
    DateTime current = System.DateTime.Now;
   
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            SqlConnection con = DB.getcon();
            string sqlstr = "select*from Categories";
            DataSet ds = new DataSet();
            SqlDataAdapter sda = new SqlDataAdapter(sqlstr,con);
            sda.Fill(ds,"cate");
            this.DropDownList1.DataSource = ds.Tables["cate"].DefaultView;
            this.DropDownList1.DataTextField="CatName";
            this.DropDownList1.DataValueField="CatID";
            DropDownList1.DataBind();    
            

        }

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        string mname = this.TextBox1.Text;
        string mclass = this.DropDownList1.SelectedValue.ToString();
        string director = this.TextBox2.Text;
        string actor = this.TextBox3.Text;
        string length = this.TextBox4.Text;
        DateTime dt = Convert.ToDateTime(this.TextBox5.Text);
        
        string country = this.TextBox6.Text;
        string laguage = this.TextBox7.Text;
        string dec = this.TextBox9.Text;
        string dtt = current.Year + "年" + current.Month + "月" +current.Day+"日"; 
        if (Page.IsValid)
        {
            Boolean fileok1 = false;
            Boolean fileok2 = false;
            string path = Server.MapPath("~/UploadImages/");
            string path1 = Server.MapPath("~/Movies/");
            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++)
                {
后面还有 62 行代码,购买后查看完整代码

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

AI 解读 AI

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

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