question.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 question : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
SqlConnection con = db.ceratcon();
con.Open();
DataSet newsSet = new DataSet();
SqlDataAdapter adapter = new SqlDataAdapter();
adapter.SelectCommand = new SqlCommand(
"select * from News", con);
adapter.Fill(newsSet);
String xmlSchema = newsSet.GetXml();
Xml1.DocumentContent = xmlSchema;
if (!IsPostBack)
{
binder();
}
}
private void binder()//帮顶函数
{
SqlConnection con = db.ceratcon();
con.Open();
SqlDataAdapter sdr = new SqlDataAdapter(" select * from question ", con);
DataSet ds = new DataSet();
sdr.Fill(ds, "question");
GridView1.DataSource = ds.Tables["question"].DefaultView;
this.GridView1.AllowPaging = true;
this.GridView1.PageSize = 30;
this.GridView1.DataBind();
if (this.GridView1.PageIndex == 0)
{
this.LinkButton1.Enabled = false;
this.LinkButton2.Enabled = false;
}
else
{
this.LinkButton1.Enabled = true;
this.LinkButton2.Enabled = true;
}
if (this.GridView1.PageIndex == this.GridView1.PageCount - 1)
{
this.LinkButton3.Enabled = false;
this.LinkButton4.Enabled = false;
}
else
后面还有 86 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。