localhost未响应

兔子家族-二哥 2017-04-07 11:45:04
在页面加载完成之后不进行任何操作,大概界面6秒钟无响应之后就出现了这个情况。主界面就加载了一个Repeater。
已经靠删除代码确定过了,主要是Repeater加载数据出现的这个问题,但是我测试该SQL在数据库中瞬间就查询出来了,不知道为何会响应如此慢。


protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
//txtStartDate.Text = DateTime.Now.ToString("yyyy-MM-") + "01";
//txtEndDate.Text = DateTime.Now.ToString("yyyy-MM-dd");
BindServerList();
AndroidDataBind();
}
}


private void AndroidDataBind()
{

string sql = "select acf.*,ali.userid,ali.LockDateTime,ali.AndroidStatus,ats.Accounts,gri.ServerName from AndroidConfigure acf,AndroidLockInfo ali,THPlatformDBLink.THPlatformDB.dbo.GameRoomInfo gri,AccountsInfo ats where acf.BatchID=ali.BatchID and acf.ServerID=gri.ServerID and ali.userid=ats.userid ";
sql += " " + this.SearchItems + " ";
sql += this.Orderby;
DataSet ds = AccountInfoHelper.Query(sql);
PagedDataSource pds = new PagedDataSource();
pds.AllowPaging = true;
pds.PageSize = anpNews.PageSize;
pds.CurrentPageIndex = anpNews.CurrentPageIndex - 1;
pds.DataSource = ds.Tables[0].DefaultView;
anpNews.RecordCount = pds.DataSourceCount;
this.rptAndroid.DataSource = pds;
this.rptAndroid.DataBind();
}
...全文
789 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
引用 4 楼 happybebe 的回复:
private void AndroidDataBind()
        {
             
            string sql = "select acf.*,ali.userid,ali.LockDateTime,ali.AndroidStatus,ats.Accounts,gri.ServerName from AndroidConfigure acf,AndroidLockInfo ali,THPlatformDBLink.THPlatformDB.dbo.GameRoomInfo gri,AccountsInfo ats where acf.BatchID=ali.BatchID and acf.ServerID=gri.ServerID and ali.userid=ats.userid ";
            sql += " " + this.SearchItems + " ";
            sql += this.Orderby;
            DataSet ds = AccountInfoHelper.Query(sql);
          
            this.rptAndroid.DataSource = ds.table[0];
            this.rptAndroid.DataBind();
        }
分页前端控制 不就行了
写错了
  • 打赏
  • 举报
回复
private void AndroidDataBind()
        {
             
            string sql = "select acf.*,ali.userid,ali.LockDateTime,ali.AndroidStatus,ats.Accounts,gri.ServerName from AndroidConfigure acf,AndroidLockInfo ali,THPlatformDBLink.THPlatformDB.dbo.GameRoomInfo gri,AccountsInfo ats where acf.BatchID=ali.BatchID and acf.ServerID=gri.ServerID and ali.userid=ats.userid ";
            sql += " " + this.SearchItems + " ";
            sql += this.Orderby;
            DataSet ds = AccountInfoHelper.Query(sql);
          
            this.rptAndroid.DataSource = pds.table[0];
            this.rptAndroid.DataBind();
        }
分页前端控制 不就行了
  • 打赏
  • 举报
回复
说好的Repeater 在哪呢?
  • 打赏
  • 举报
回复
引用 1 楼 shoppo0505 的回复:
没办法,你把每页显示的数据行减少点吧。
没用的。。。试了
shoppo0505 2017-04-07
  • 打赏
  • 举报
回复
没办法,你把每页显示的数据行减少点吧。

62,074

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧