search.aspx.cs
(开头部分) 3KB这里只显示每个文件的开头 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 search : System.Web.UI.Page
{
int CurrentPage;
int PageSize;
int RecodCount;
int PageCount;
string movname;
protected void Page_Load(object sender, EventArgs e)
{
PageSize = 10;
if (!IsPostBack)
{
listbind();
CurrentPage = 0;
ViewState["PageIndex"] = 0;
RecodCount = CalculateRecord();
Label2.Text = RecodCount.ToString();
PageCount = RecodCount / PageSize + 1;
this.Label3.Text = RecodCount.ToString();
ViewState["PageCount"] = PageCount;
movname = Request.QueryString["id"];
}
}
public int CalculateRecord()
{
//string movname =Request.QueryString[Session["MovName"].ToString()];
int intcount;
string strcount = "select count(*) as co from Movies where MovName like'" + movname + "%'";
SqlConnection con = DB.getcon();
con.Open();
SqlCommand cmd = new SqlCommand(strcount, con);
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
intcount = Int32.Parse(dr["co"].ToString());
}
else
{
intcount = 0;
}
dr.Close();
return intcount;
}
ICollection Createsoure()
{
string movname = Session["MovName"].ToString();
int StartIndex;
StartIndex = CurrentPage * PageSize;
后面还有 58 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
