msg_user.aspx.cs

(开头部分) 6KB

这里只显示每个文件的开头 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.OleDb;
using System.IO;
using System.Net;
using System.Text.RegularExpressions;

public partial class _Default : System.Web.UI.Page
{
    public bool birthday_date(string input)
    {
        return Regex.IsMatch(input, "\\b(?<year>\\d{4,4})/(?<month>\\d{1,2})/(?<day>\\d{1,2})\\b");
    }
    OleDbConnection con;
    protected void Page_Load(object sender, EventArgs e)
    {
        string str = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("DB_51Aspx/db.mdb");
        con = new OleDbConnection(str);
        con.Open();
        if (!IsPostBack)
        {
           
            bind();
        }
    }
    public void bind()
    {

        if (Session["user_name"] == null)
        {
            Response.Redirect("msg.aspx?type=4");
            return;
        }
        DataTable table = new DataTable();
        table.Columns.Add(new DataColumn("Name", typeof(string)));
        string server_Path = Server.MapPath("images/head_images");
        DirectoryInfo dir = new DirectoryInfo(server_Path);
        foreach (FileInfo fileName in dir.GetFiles())
        {
            DataRow dd = table.NewRow();
            dd[0] = fileName;
            table.Rows.Add(dd);

        }
        DropDownList1.DataSource = table;
        DropDownList1.DataTextField = "Name";
        DropDownList1.DataBind();

        title.Text = "会员资料查询与修改";
        Label1.Text = Session["user_name"].ToString();
        string SqlStr = "select * from [user] where [user_name]='" + Session["user_name"] + "'";
        OleDbCommand cmd = new OleDbCommand(SqlStr, con);
后面还有 98 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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