留言簿

我要留言
留言搜索

2007-07-23 03:49  wuxiaobo5909

AspNetPager1.StartRecordIndex出错了!<br>点第二页时..值等于AspNetPager1.PageSize+1,而不是2<br>希望你看到后尽快改改
回复:没有错,请仔细看下帮助文档中StartRecordIndex的说明,这个属性的值指的是当前页要分页的数据记录的起始索引,而不是页索引,当前页索引是CurrentPageIndex。谢谢!

2007-07-23 00:51  hnvvv

做翻页的时候,报错<br>pager_PageChanged重载均与委托 System.EventHandler 不匹配<br><br><br>代码:<br>protected void pager_PageChanged(object sender, Wuqi.Webdiyer.PageChangingEventArgs e)<br>        {<br>            pager1.CurrentPageIndex = e.NewPageIndex;<br>            NewsList_Bind();<br>        }<br>请问如何解决
回复:protected void pager_PageChanged(object sender, Wuqi.Webdiyer.PageChangingEventArgs e)应是:protected void pager_PageChanged(object sender, EventArgs e),另外6.0版中不再需要在分页事件中设置CurrentPageIndex的值,控件会自动设置,所以上面的代码中pager1.CurrentPageIndex = e.NewPageIndex;也应该去掉。

2007-07-22 22:01  bmw

我也不知道什么原因,晚上打开时,最后一条数据也显示出来了。很是奇怪啊
回复:调试一下看向product.getalltui这个方法传递的参数以及它返回的记录是否正确。

2007-07-22 11:19  bmw

&lt;webdiyer:AspNetPager ID=&quot;Pager1&quot; runat=&quot;server&quot; AlwaysShow=&quot;True&quot; Direction=&quot;LeftToRight&quot; FirstPageText=&quot;首页&quot; Font-Overline=&quot;False&quot; Font-Size=&quot;Small&quot; Font-Strikeout=&quot;False&quot; Font-Underline=&quot;False&quot; Height=&quot;20px&quot; InputBoxClass=&quot;inputcss2&quot; LastPageText=&quot;未页&quot; NextPageText=&quot;下一页&quot; <br>        PagingButtonSpacing=&quot;8px&quot; PrevPageText=&quot;上一页&quot; ShowBoxThreshold=&quot;10&quot; ShowCustomInfoSection=&quot;Left&quot; ShowDisabledButtons=&quot;False&quot; SubmitButtonText=&quot;确定&quot; TextAfterInputBox=&quot;页&quot; TextBeforeInputBox=&quot;转到&quot; Width=&quot;750px&quot; OnPageChanged=&quot;Pager1_PageChanged&quot; PageSize=&quot;4&quot; ShowInputBox=&quot;Always&quot; CustomInfoSectionWidth=&quot;80%&quot; ForeColor=&quot;Black&quot; HorizontalAlign=&quot;Right&quot;&gt;

2007-07-22 11:18  bmw

您好!<br><br>前两天下了你的控件,今天用时出了些问题。<br>vs2005+xp+sql2000<br> <br>datalist分页<br><br>我用你页面上的工具生成了存储过程。<br>create procedure Pr_alltui <br>(<br>@pagesize int,<br>@pageindex int)<br>as<br>set nocount on<br>begin<br>declare @indextable table(id int identity(1,1),nid int)<br>declare @PageLowerBound int<br>declare @PageUpperBound int<br>set @PageLowerBound=(@pageindex-1)*@pagesize<br>set @PageUpperBound=@PageLowerBound+@pagesize<br>set rowcount @PageUpperBound<br>insert into @indextable(nid) select productid from product order by fadate desc<br>select O.productid,O.productname,O.photo from product O,@indextable t where O.productid=t.nid<br>and t.id between @PageLowerBound+1 and @PageUpperBound order by t.id<br>end<br>set nocount off<br><br>GO<br><br>帮定时,给存储过程传去两个参数。<br>          this.Pager1.RecordCount = Convert.ToInt32(dr[&quot;total&quot;].ToString());<br>          int xpagesize = this.Pager1.PageSize;<br>          int xpageindex = this.Pager1.CurrentPageIndex;<br>          bindalltui(xpagesize,xpageindex);<br>      <br>    private void bindalltui(int xpagesize,int xpageindex)<br>    {<br>        product product = new product();<br>        SqlDataReader dr = product.getalltui(xpagesize,xpageindex);<br>        data1.DataSource = dr;<br>        data1.DataBind();<br>        dr.Close();<br>        AddCustomText();<br>    }<br>    public void AddCustomText()<br>    {<br>        Pager1.CustomInfoHTML = &quot;信息总数:&quot; + Pager1.RecordCount.ToString() + &quot;&lt;/b&gt;&quot;;<br>        Pager1.CustomInfoHTML += &quot; 总页数:&quot; + Pager1.PageCount.ToString() + &quot;&lt;/b&gt;&quot;;<br>        Pager1.CustomInfoHTML += &quot; 当前页:&quot; + Pager1.CurrentPageIndex.ToString() + &quot;&lt;/b&gt;&quot;;<br><br><br>    }<br>问题是:数据库有9条数据,信息总数显示为9,总页数3页(我每页显示4条),<br>别的一切正常,就是最后一页的数据显示出来,也就是第9条数据没显示,<br>页数1.2.3,第3页空白,<br>总之:最后一条记录不显示。还请帮忙查查原因。谢谢!<br>还有CustomInfoSectionWidth这个属性,我怎么设成80%和20%显示也没区别阿<br>我是想让自定义的数据显示在最左边,但是他不动啊!老是紧挨着“首页”<br><br><br><br>&lt;webdiyer:AspNetPager ID=&quot;Pager1&
回复:product.getalltui这个方法是怎么写的呢?您可以调试一下这个传到这个方法中的参数以及返回的记录数是否正确。要让自定义的数据显示在最左边应该设置CustomInfoTextAlign="left"或者不用设置取默认值即可,CustomInfoSectionWidth属性是起作用的,您可以在html源代码中控件部分的代码中看到。谢谢!

2007-07-21 15:34  slimboy

您好!我是编译您的源码出现下面的错误:<br>对程序集“AspNetPager2003src\obj\Release\AspNetPager.dll”签名时加密失败 --“读取密钥文件“aspnetpager.snk”时出错 -- 系统找不到指定的文件。 ”
回复:源代码中没包含签名用的密钥文件,您可以用sn.exe -k命令行工具自己生成一个aspnetpager.snk文件即可。谢谢!

2007-07-20 11:36  kinke

您好:<br>Url重写的表达式中加入%参数%就会提示无效表达式!<br>我用的是2003的6.0.0
回复:您是怎么设置的?可否把详细的错误信息发上来?谢谢!

2007-07-19 16:52  slimboy

您好!<br>您能发一个 AspNetPager V5.0 版本的源码给我吗?我到网上没找着。<br>我的邮箱地址:slimboy2008@126.com
回复:对不起,5.0的已经找不到了,不过您可以下载6.0版的源代码,新版的修正了以前版本的一些bug。谢谢!

2007-07-19 11:09  jack_zhj

有没有AspNetPager邦定到oracle数据库的分页例子啊?
回复:暂时没有Oracle的例子,不过分页控件和数据源是毫不相干的,只要您会从Oracle中获取分页的数据就没有任何问题了,Oracle的分页方法或者分页存储过程只要用搜索引擎搜索一下就能找到很多。谢谢!

2007-07-19 10:28  slimboy

这是我获取关键词的方法:<br>protected string GetQueryString(string sKey,System.Text.Encoding e)<br>{<br>	string QueryString = Server.UrlDecode(System.Web.HttpUtility.UrlDecode(Request.ServerVariables[&quot;QUERY_STRING&quot;], e));<br>	System.Text.RegularExpressions.Regex reg = new System.Text.RegularExpressions.Regex(sKey + &quot;=([^&amp;$]*?)(&amp;|$)&quot;);<br>	System.Text.RegularExpressions.Match m = reg.Match(QueryString);<br>	if (m.Success)<br>	{<br>		return m.Result(&quot;$1&quot;);<br>	}<br>	else return String.Empty;<br>}<br><br>if( Request[&quot;keywords&quot;] != null )<br>{<br>  if( Request.RawUrl.IndexOf(&quot;keywords=&quot;) != -1 )<br>  {<br>     key = Request[&quot;keywords&quot;].ToString().Trim();<br>  }<br>  else<br>  {<br>    key = GetQueryString(&quot;keywords&quot;,Encoding.GetEncoding(&quot;utf-8&quot;));<br>  }<br>}
回复:是什么问题呢?
;