为什么我在同一个页面使用两个aspNetPager,触发下一页,两个aspNetPager的下一页都触发了

解决方案 »

  1.   

    不会都写在Page_Load 里面吧
      

  2.   

    <webdiyer:AspNetPager ID="AspNetPagerDecisionDecision" runat="server" 
                                                            Width="100%" UrlPaging="true"
                                                            ShowPageIndexBox="Always" AlwaysShow="true" PageIndexBoxType="TextBox" ShowMoreButtons="false"
                                                            TextBeforePageIndexBox="转到第: " TextAfterPageIndexBox="页" SubmitButtonText="跳转"
                                                            CssClass="paginator" HorizontalAlign="Right" PageSize="3" SubmitButtonClass="btn1_style"
                                                            CustomInfoStyle="width:10%;" UrlPageSizeName="pagesize" ShowPageIndex="false"
                                                            CustomInfoHTML="<div style='hight:15px;padding-top:8px;'> 第 <font color='red' >%CurrentPageIndex%</font> 页  共 %PageCount% 页</div>"
                                                            ShowCustomInfoSection="Right" CustomInfoTextAlign="Right" LayoutType="Table"
                                                            PrevPageText="上一页" NextPageText="下一页" FirstPageText="首页" LastPageText="尾页" 
                                                            EnableTheming="true" 
                                                            onpagechanged="AspNetPagerDecisionDecision_PageChanged">我是分开了啊,用AspNetPagerDecisionDecision_PageChanged这个名字区分的
      

  3.   

    两个的话,你有没有用 CloneFrom这个属性
    http://www.webdiyer.com/AspNetPagerDocs/Wuqi.Webdiyer.AspNetPager.CloneFrom.html
      

  4.   

    那说明你两个aspnetpager的分页控件绑定了相同的事件
    可以检查或者更换一下你注册的事件的名称
      

  5.   

    你可能理解错了,我的意思是不让一个页面多个AspNetPager不要同时触发一个事件
      

  6.   


    <webdiyer:AspNetPager ID="AspNetPagerCaseInfo" runat="server" Width="100%" UrlPaging="true"
                                                            ShowPageIndexBox="Always" AlwaysShow="true" PageIndexBoxType="TextBox" ShowMoreButtons="false"
                                                            TextBeforePageIndexBox="转到第: " TextAfterPageIndexBox="页" SubmitButtonText="跳转"
                                                            CssClass="paginator" HorizontalAlign="Right" PageSize="5" SubmitButtonClass="btn1_style"
                                                            CustomInfoStyle="width:10%;" UrlPageSizeName="pagesize" ShowPageIndex="false"
                                                            CustomInfoHTML="<div style='hight:15px;padding-top:8px;'> 第 <font color='red' >%CurrentPageIndex%</font> 页  共 %PageCount% 页</div>"
                                                            ShowCustomInfoSection="Right" CustomInfoTextAlign="Right" LayoutType="Table"
                                                            PrevPageText="上一页" NextPageText="下一页" FirstPageText="首页" LastPageText="尾页" OnPageChanged="AspNetPagerCaseInfo_PageChanged"
                                                            EnableTheming="true" >
                                                        </webdiyer:AspNetPager>上面是第一个, 这个是第二个, 不知道这样写有问题吗