news.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;
//该源码下载自www.51aspx.com(51aspx.com)
public partial class news : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
bind1();
}
}
void bind1()
{
string news_type;
string sql;
if (Request.QueryString["typeid"] == null)
{
news_type = "1";
}
else
{
news_type = Request["typeid"].ToString();
}
sql = "select * from news where news_type="+news_type;
PagedDataSource objPds = new PagedDataSource();
objPds.DataSource = access.GDS(sql).Tables[0].DefaultView;
objPds.AllowPaging = true;
//string recordcount=objPds.DataSourceCount.ToString();//objPds.Count.ToString(); //记录总数
objPds.PageSize = 5;
string pagecount = objPds.PageCount.ToString(); //总页数
//Label2.Text="(共"+pagecount+"页,";
//Label3.Text=recordcount+"条)";
int CurPage;
if (Request.QueryString["Page"] != null)
{
CurPage = Convert.ToInt32(Request.QueryString["Page"]);
}
else
{
CurPage = 1;
}
objPds.CurrentPageIndex = CurPage - 1;
//Label1.Text = "第" + CurPage.ToString() + "页";
后面还有 26 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读 AI
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
