Blank page after dropdownlist selection??

  • Thread starter Thread starter Chris Zopers
  • Start date Start date
C

Chris Zopers

Hello,

I have developed an ASP.NET page, with a dropdownlist and some
textboxes. When a selection is made in the dropdownlist, some data is
retrieved from a database and displayed in the textboxes.

To to this, I've written some code in the selectedIndexChanged event of
the dropdownlist.

When a selection is made, it takes a few seconds for ASP.NET to retrieve
the data and display it. When I expand the dropdownlist again in those
few seconds, a blank white screen is displayed and I can't return to the
page anymore.

Does anyone know how to solve this problem?

Greetings,
Chris.
 
Hello,

The dropdownlist is only databinded the first time the page is loaded.
In the Page_Load event I have written the following code:

If IsPostBack = False Then
sInitPage()
End If

In the sub sInitPage the dropdownlist is filled.

Greetings,
Chris.
 
This is why your dropdownlist is empty on postback. You have to populate it
on every postback.
 
Hello,

The problem is not that the dropdownlist is empty, but that the whole
page is blank. Only a blank page is shown, so also all controls are
gone.

When I make a selection in the dropdownlist, some data is retrieved from
the database. When I wait, the page is returned just fine (also the
dropdownlist!) and the data is displayed. But when I click on the
dropdownlist while the page is busy retrieving data, than the problem
with the blank page occurs....

Greetings,
Chris
 
Back
Top