Click here to Skip to main content
14,878,631 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello ,
paging have problem:

My code:
ASP.NET
<asp:DataPager ID="DataPagerProducts" runat="server" PageSize="5" PagedControlID="lvGroupedLabor" OnPreRender="DataPagerProducts_OnPreRender">

                                  <fields>
      <asp:NextPreviousPagerField FirstPageText="<<" ShowFirstPageButton="True" 
             ShowNextPageButton="False" ShowPreviousPageButton="False" />
      <asp:NumericPagerField />
      <asp:NextPreviousPagerField LastPageText=">>" ShowLastPageButton="True" 
             ShowNextPageButton="False" ShowPreviousPageButton="False" />
   </fields>

codebehind:
C#
if (!IsPostBack)
            {
                BindListview();
            }

     protected void DataPagerProducts_OnPreRender(object sender, EventArgs e)
        {
            BindListview();
        }

giving error The control collection cannot be modified during DataBind, Init, Load, PreRender or Unload phases.
i found in the google but can not find right soluation
Posted
Updated 20-Jun-13 1:31am
v2
Comments
sadhana4 20-Jun-13 8:14am
   
i solved
Karthik Harve 20-Jun-13 8:16am
   
share the solution, so that everybody can know the reason for error.
samadhan_kshirsagar 20-Jun-13 8:58am
   
please share the solution.....
Sunasara Imdadhusen 20-Jun-13 9:03am
   
Yes, if you resolved the issue then you should post your solution in the Solution box, so everybody will take benefit from that

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900