Click here to Skip to main content
14,883,453 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi all,

I have a form with some CheckBoxLists. I have to make them visible and invisible based on some condition. When I keep the CheckBoxLists inside a server control like PlaceHolder, Im not getting the CheckBoxLists when the page is PostBack. What to do to keep the state of CheckBoxLists.

Thanks in advance..
Posted

1 solution

If you make them invisible on the server, they won't exist on the client. When faced with issues like this, I would place a hidden control on my page, and store the data I needed as a string, perhaps XML, and thus keep track of my data regardless of what other controls were in my viewstate.
   

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

  Print Answers RSS
Top Experts
Last 24hrsThis month



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