AspNetPager+updatepanel以postback方式回传问题,第一页有反应,第二页点了不刷新了
HTML code<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional" style="width:566px; float:left;" ClientIDMode="AutoID" ViewStateMode="Enabled"> <ContentTemplate> <asp:Repeater ID="adlistRP" runat="server" ViewStateMode="Enabled" OnItemCommand="adlistRP_ItemCommand" > <ItemTemplate> <div class="content"> <asp:Image ID="Image1" ImageUrl='<%#Eval("ss_pic") %>' runat="server" style="margin:5px;width:60px;height:60px;float:left;" /> <div style="width:490px;float:right"> <div style="margin:5px 0;width:490px;float:right;"> <a><%#Eval("ss_name") %>:</a><%#Eval("ad_word") %><%#Eval("ad_id") %></div> <div style="float:right;width:490px;height:25px;"> <div style="width:40px;height:25px;float:right; padding-left:3px; border-left:1px solid #dddddd; "> <asp:Button ID="Button2" CommandName="1" CommandArgument='<%#Eval("ad_id")%>' runat="server" Text="评论" style="background-color:white; border: 0px; height:28px; cursor:pointer;" /></div> </div></div> <asp:UpdatePanel runat="server" ID="UPLL" UpdateMode="Conditional" Visible="true" ViewStateMode="Enabled"> <ContentTemplate> <div style="float:right; width:490px; background-color:#ECEFF5; margin-top:13px;"> <asp:Label ID="LBL" runat="server" Text="waiting" Visible="false" ></asp:Label> <asp:Image ID="Image2" runat="server" style="float:left; width:40px; height:40px; margin:5px;" /> <asp:TextBox ID="comment" runat="server" TextMode="MultiLine" style="float:left; margin:5px 0; width:420px; height:80px; overflow:hidden;"></asp:TextBox> <asp:Button ID="Do_comment" CommandName="comment" CommandArgument='<%#Eval("ad_id")%>' runat="server" Text="评论" ForeColor="White" class="button" style="float:right;"/> </div> <asp:Repeater ID="commentlist" runat="server" ViewStateMode="Enabled"> <ItemTemplate> <div style="float:right; width:490px; background-color:#ECEFF5; margin-top:2px;"> <asp:Image ID="Image3" runat="server" style="float:left; width:40px; height:40px; margin:5px;" /> <div style="float:left; width:420px; margin:10px 0;"> <div style="float:left; width:420px; font-size:small;"><%#Eval("com_content")%></div> <div style="float:left; width:420px; font-size:small;">用户名 评论时间</div> </div> </div> </ItemTemplate> </asp:Repeater> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="adlistRP" /> </Triggers> </asp:UpdatePanel> </div> </ItemTemplate> </asp:Repeater> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="DropDownList1" /> </Triggers> </asp:UpdatePanel> <asp:UpdatePanel ID="pagex" UpdateMode="Conditional" runat="server" style="float:left;clear:left;" ViewStateMode="Enabled"> <ContentTemplate> <webdiyer:AspNetPager ID="AspNetPager1" runat="server" Width="610px" FirstPageText="第一页" LastPageText="最后一页" NextPageText="下一页" PrevPageText="上一页" Font-Names="Arial" BackColor="#F8B500" AlwaysShow="true" ShowInputBox="Always" SubmitButtonText="转到" SubmitButtonStyle="botton" OnPageChanging="pageBind_PageChanging" ForeColor="Black" HorizontalAlign="Center" PageSize="10" style="font-size: 12px; color: #0099ff; background-color: #ffffff; text-decoration: none" UrlPaging="false" InvalidPageIndexErrorMessage="请请输入正确的页码!" ShowNavigationToolTip="True" TextAfterInputBox="页" TextBeforeInputBox="第" PageIndexBoxType="DropDownList" PageIndexOutOfRangeErrorMessage="请请输入正确的页码!" ShowPageIndexBox="Always" ViewStateMode="Enabled" > </webdiyer:AspNetPager></ContentTemplate> <Triggers><asp:AsyncPostBackTrigger ControlID="DropDownList1" /></Triggers> </asp:UpdatePanel>