HomePage.aspx.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using MyWeb.DBUtility;
using MyWeb.WebUtility;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace MyWeb
{
public partial class HomePage : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
if(Request["flag"]!=null){
if(Request["flag"].ToString()=="admin"){
Session["id"] = null;
Session["name"] = null;
Session["admin"] = null;
}
if (Request["flag"].ToString() == "user")
{
Session["id"] = null;
Session["name"] = null;
Session["user"] = null;
}
}
DBHelper db = new DBHelper();
//string sql = "select top 8 * from Dynamic_Tbl where del=0 order by addDate desc";
//DataSet ds = db.Query(sql);
//Repeater1.DataSource = ds.Tables[0];
//Repeater1.DataBind();
string sql = "select top 1 * from Introduce_Tbl where del=0";
DataSet ds = db.Query(sql);
if (ds.Tables[0].Rows.Count > 0)
{
Label1.Text = ds.Tables[0].Rows[0]["content"].ToString();
}
}
}
//查询数据
//[WebMethod]
//public static string SearchResource(string t1)
//{
// DBHelper db = new DBHelper();
// string sqlwhere = "";
// //得到查询条件
// if (t1 != "")
// {
// sqlwhere = " and title like '%" + t1 + "%'";
// }
// //查询sql
// string sql = "select top 1 * from Resource_Tbl where del=0 " + sqlwhere + " order by addDate desc";
// DataSet ds = db.Query(sql);
后面还有 11 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
