AddFilesInfo.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;
public partial class AddFilesInfo : 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 where UserId='" + Session["UserId"].ToString()+ "' ");
DropDownList1.DataValueField = "id";
DropDownList1.DataTextField = "name";
DropDownList1.DataBind();
DropDownList2.DataSource = data.GetDataReader("select * from MuLu where UserId='" + Session["UserId"].ToString() + "' ");
DropDownList2.DataValueField = "id";
DropDownList2.DataTextField = "FolderAdd";
DropDownList2.DataBind();
string sqlstr = "select * from dbo.FilesType order by id desc";
DataList1.DataSource = data.GetDataReader(sqlstr);
DataList1.DataBind();
}
}
protected void Button1_Click1(object sender, EventArgs e)
{
string sql = "insert into FilesInfo(TitleName,FileDs,typeid,TypeName,UserName,UserId,Files,MuLuID,PathName)values('" + TextBox1.Text.Trim() + "','" + content1.Value + "','" + DropDownList1.SelectedValue + "','" + DropDownList1.SelectedItem.Text + "','" + Session["UserName"].ToString() + "','" + Session["UserId"].ToString() + "','" + TextBox2.Text + "','" + DropDownList2.SelectedValue + "','"+DropDownList2.SelectedItem.Text+"')";
data.RunSql(sql);
Alert.AlertAndRedirect("添加成功继续添加", "AddFilesInfo.aspx");
}
protected string CutChar(string strChar, int intLength)
{
//取得自定义长度的字符串
if (strChar.Length > intLength)
{ return strChar.Substring(0, intLength); }
else
{ return strChar; }
}
protected void Button2_Click(object sender, EventArgs e)
{
后面还有 10 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。