SelectedIndexChanged

P

Paul

This gets a little complex, so bear with me.

I've created an ASP.NET page that creates a variety of controls
dynamically. It creates a data source, a form view, a list box, a drop
down list, a button and some other sundry stuff on the fly.

The problem is this:

The SelectedIndexChanged events for the list boxes fire at strange
times. For example, when the list box changes, it re-populates the
drop down box. But when something is selected in the drop down box,
the select event for the original list box gets fired too, even though
it didn't get touched on this post back.

I presume the issue has to do with page life cycle and where and how I
dynamically create the controls. I've tried both PageLoad and
PageInit. PageLoad has the problem above. WIth PageInit, I actually
lose the form view.

Can anyone give me any insight?
 

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

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top