EditFilesInfo.aspx.cs

(开头部分) 2KB

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

using System;
using System.Data;
using System.Configuration;
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.IO;

using System.Data.SqlClient;
public partial class EditFilesInfo : System.Web.UI.Page
{
    SqlHelper data = new SqlHelper();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            DropDownList1.DataSource = data.GetDataReader("select * from FilesType");
            DropDownList1.DataValueField = "id";
            DropDownList1.DataTextField = "name";
            DropDownList1.DataBind();
            string sqlstr = "select  *  from dbo.FilesType order by id desc";

            DataList1.DataSource = data.GetDataReader(sqlstr);
            DataList1.DataBind();

            Get_Article();


            DropDownList2.DataSource = data.GetDataReader("select * from MuLu   where UserId='" + Session["UserId"].ToString() + "' ");
            DropDownList2.DataValueField = "id";
            DropDownList2.DataTextField = "FolderAdd";
            DropDownList2.DataBind();
        }
    }
    protected string CutChar(string strChar, int intLength)
    {
        //取得自定义长度的字符串
        if (strChar.Length > intLength)
        { return strChar.Substring(0, intLength); }
        else
        { return strChar; }

    }
    private void Get_Article()
    {
        int id = int.Parse(Request.QueryString["id"].ToString());
        SqlDataReader dr = data.GetDataReader("select * from FilesInfo where id=" + id);
        dr.Read();
        TextBox1.Text = dr["TitleName"].ToString();
        content1.Value = dr["FileDs"].ToString();

        Label1.Text = dr["PathName"].ToString();
        Hidden1.Value = dr["Files"].ToString();
        
    }
    protected void Button1_Click1(object sender, EventArgs e)
    { 
后面还有 15 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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