troubleshooting Question

DropDownList with AutoPostBack = True Triggers SelectedIndexChanged on every postback

Avatar of Starr Duskk
Starr DuskkFlag for United States of America asked on
ASP.NETVisual Basic.NET
3 Comments1 Solution129 ViewsLast Modified:
I have a DropDownList with AutoPostBack = True and set with Handles ddlExportOption.SelectedIndexChanged
I do not have this event also in code in front, only attached with a Handles to the event.

When I change the value it triggers as expected.

When I  change another postback, it still triggers the event.

Does anyone have an example of how you used a DropDownList with an AutoPostBack and that you have got it to NOT trigger when it is NOT the control being changed?

What I #1 would like is not a bunch of "have you trieds" but a known, working solution.

Apparently this is a known issue as I have read and tried numerous things suggested in forums. None of which work.

So that you won't ask "Have you tried...?" Here is what I've tried.

UpdatePanel with AsyncPostBackTrigger on controlId and event name.
DataBind on control on every postback.
Adding EnableViewState="true" to the control and to the page.


I've tried combinations of each of the above.

I've read to try ControlState and Override LoadPostData  if I don't wish to EnableViewState. Which I don't mind if I EnableViewState or not, it's just that when I do have it enabled, it still does the postback event anyway and has other unwanted results which I won't go into.

And again...

Does anyone have an example of how you used a DropDownList with an AutoPostBack and that you have got it to NOT trigger when it is NOT the control being changed?

What I #1 would like is not a bunch of "have you trieds" but a known, working solution.

thanks!
ASKER CERTIFIED SOLUTION
Starr Duskk
ASP.NET VB.NET Developer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros