Page Refresh Issue

Posted on 2007-10-15
Medium Priority
Last Modified: 2013-12-17
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.?
Question by:marmaxx
  • 3
  • 2
LVL 96

Expert Comment

by:Bob Learned
ID: 20079260
If I understand your question, you could set AutoPostBack = False.


Author Comment

ID: 20079351
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.

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

Again, not my code. I don't know why the binding was done this way.
LVL 96

Accepted Solution

Bob Learned earned 2000 total points
ID: 20079393
You are in a bind (no pun intended), then.  If you want to have cascading DropDownList controls, without a post-back, then you would need to resort to using AJAX controls from Microsoft's AJAX control toolkit:

CascadingDropDown Demonstration


Author Comment

ID: 20079779
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.
LVL 96

Expert Comment

by:Bob Learned
ID: 20079792
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.


Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
Suggested Courses
Course of the Month12 days, 15 hours left to enroll

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question