Link to home
Start Free TrialLog in
Avatar of marmaxx
marmaxx

asked on

Page Refresh Issue

I have a default application page (Default.aspx) which contains a user control. This user control contains 4 drop-down list boxes. My problem is that every time I make a selection in one of the drop-down list boxes (causing the selected index changed event to fire) the host page (Default.aspx) is refreshed. At least this is what I believe is happening since the page flashed briefly after the selection is made.

Is there any way to prevent this from happening.?
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

If I understand your question, you could set AutoPostBack = False.

Bob
Avatar of marmaxx
marmaxx

ASKER

Thanks Bob!

I wish it were that easy (it's the first thing I thought of doing). The problem is with the way the application is doing the binding. For some reason, the person who originally wrote the application decided to pass in the drop down list itself to the binding method. This introduces a dependency upon AutoPostback being set to "True". If I set it to false,  the binding doesn't happen.

<snip>
BindControls bc = new BindControls();
bc.BindGroupDropDown(ddlGroup, iDivision, iDept);

Again, not my code. I don't know why the binding was done this way.
ASKER CERTIFIED SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of marmaxx

ASKER

Hmmmm.... that's odd.

The application I am working on was ported from ASP.NET 1.1. It was originally an ASP.NET 1.1 website, it is now an ASP.NET 2.0 web application. The behavior I described does not occur in the original.

In the original application, there is still a flicker, but it appears that only the drop down list boxes themselves are flickering (as opposed to the entire page).

Has something changed between the two versions of ASP.NET?

In the meantime, I have one more thing I want to try. Either way, I'll award you the points. You have been more than helpful. I appreciate it.
It is difficult to say why a 1.1 site would be different than a 2.0 site when it comes to this.  My first inclination is that they should be the same.  It has been a long time since I used 1.1, so my memory is a little fuzzy about the differences.

Bob