need some help

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a datalist that has checkboxs, the user can ether select all the
checkbox or only select a few and then click a button and only show the items
selected.
Has anyone done this before?
I keep getting False returned even when the checkboxes are checked.
 
You are probably resetting the checkboxes in the Page_Load event. If so, you
are resetting them prior to pulling the values. Step through in debug after
setting a breakpoint in both the Page_Load and your control event (button
click, etc.).

The Page_Load should ONLY be used to set initial page state (not postback),
unless EVERY postback sets specific items when loaded. The actually handling
of objects after postback should be handled by the event (button click,
etc.). NOTE: The ASP.NET books on the market generally push a different
methdology, which is not wise. If you use Page_Load to load the page and the
event to handle other items, you will not end up with reset prior to working
on the item.

another NOTE: Page_Load fires before button click events.


---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 
OK i've seen examples of this using a datagrid, would that same princple work
with a datalist?
 
Back
Top