Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 711853
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T04:46:57+00:00 2026-05-14T04:46:57+00:00

I have a listing in an UpdatePanel I have some filters for that list

  • 0

I have a listing in an UpdatePanel
I have some filters for that list in the form a checkboxList control.
The checkboxList is created dynamically on page load

During the Ajax update (postback), the checkbox list is not populated form the viewstate, so I cannot get the listing to filter.

Note: If I put the checkbox list items directly in the markup, it all works, just not if the listing is populated on-postback.

protected override void OnLoad(EventArgs e)
{
    if (!Page.IsPostBack)
    {
        foreach (var p in global.Product)
            CheckListManufacurer.Items.Add(new ListItem(p, p));
    }
    base.OnLoad(e);
}


<form id="ProductListForm" runat="server">
<asp:ScriptManager ID="ScriptManager" runat="server" EnablePartialRendering="true"></asp:ScriptManager>
  <asp:CheckBoxList ID="CheckListManufacurer" runat="server" EnableViewState="true">
     <asp:ListItem Value="" Text="(All)"></asp:ListItem>
  </asp:CheckBoxList>  
  <asp:Button id="btnTestAjax" runat="server" Text="Test" />  
  <asp:UpdatePanel ID="ProductsPanel" runat="server" UpdateMode="Conditional">
      <Triggers>
          <asp:AsyncPostBackTrigger ControlID="btnTestAjax"  />
          <asp:AsyncPostBackTrigger ControlID="CheckListManufacurer" />
      </Triggers>
      <ContentTemplate>
          <sr:ProductList ID="Products" runat="server" />
      </ContentTemplate>
  </asp:UpdatePanel>
</form>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T04:46:57+00:00Added an answer on May 14, 2026 at 4:46 am

    if you populate the list in Page_Load then you’re too late.

    in the asp.net page event lifecycle viewstate is populated just before Page_PreLoad (see here: http://msdn.microsoft.com/en-us/library/ms178472.aspx )

    so if you want viewstate to be loaded into controls you dynamically add to the page you need to add them in Page_Init

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Imagine the scenario you have a listing page that is a concatenation of multiple
I have a product listing page and want to load up a detail view
I have created listing page with pagination and sorting by column name in .
I have listing pages that take a page argument on the url like the
Im facing a problem. I have a listing page in which i list all
I have a listing of manufacturers in a form (TypedMultipleChoiceField plus CheckboxSelectMultiple widget). Some
So the quick background is that I have a page listing a set of
I have a products listing page that lists 3 products in a single line
I have a query that shows me a listing of ALL opportunities in one
Have an app that has listings - think classified ads - and each listing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.