我在测试aspx网页时,老提示“百度提示-你的访问出错了“。用到了分页,一点分页就会跳到那个“百度提示-你的访问出错了”页面,http://www.baidu.com/search/error.html这是怎么回事啊?我代码肯定是没问题的呀!!!!

解决方案 »

  1.   

    你的網頁本地IIS還是服務器上的????
      

  2.   

    服务器上的,用http://localhost访问的
      

  3.   

    我的分页代码是没有错的!我用aspnetPager和手动分页代码都试过了,都是提示的您访问的页面出错了!
      

  4.   


    private void Pager(int PageIndex)
        {
            int PageSize = 30;
            
            int RecordCount = (int)DBHelper.ExecuteScalar("select count(*)from tArticle");        string sql_list = "select top " + PageSize + " * from tArticle a left join tChannel c on a.subChannelNo= c.subChannelNo and a.mainChannelNo = c.mainChannelNo where a.mainChannelNo=1 and a.subChannelNo=1 and a.articleNo not in (select top " + PageSize * (PageIndex - 1) + " articleNo from tArticle order by articleNo desc) order by a.articleNo desc";
            DataTable dt_list = DBHelper.GetDataTable(sql_list);
            
            AspNetPager1.PageSize = PageSize;
            AspNetPager1.CurrentPageIndex = PageIndex;
            AspNetPager1.RecordCount = RecordCount;        rpt_list.DataSource = dt_list;
            rpt_list.DataBind();
        }
      

  5.   

    (select top " + PageSize * (PageIndex - 1) 你調用时会出现 top 0 的情况吗?
      

  6.   

    ......lz你自己去試試select top 0 * from xxx 能不能運行成功把...
      

  7.   

    up
    看源 是解决办法最快的  。 看看哪个链接链的是 baidu   不就知道了
      

  8.   

    已经解决了。错误原因就是我没有把aspnetpager设置回传!!!原谅我吧呜呜呜呜!!!!