Confusing problem with page_unload loading listbox

V

VB Programmer

I have a listbox which is filled based on the results of a user control
(which acts as a "data filter" uc).

Page_Load of my main aspx page runs.
- Code is run which populates the listbox, but since the user control
doesn't have data yet, ALL data is shown
Page_Load of my user control runs.
- User control "filters" are populated
Page_Unload of my main aspx page runs.
- Code is run which populates the listbox based on the filters

I can trace the code and it follows this sequence, but by the time my page
is finished running the listbox shows ALL data still. Any ideas? I DO
clear the listbox before I populate it.

I have a button called 'Refresh' which forces the repopulation of the
listbox. Clicking on this button manually provides the expected results.
In Page_Unload I'm basically calling "cmdRefresh_Click(sender, e)".

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top