Why ddlUser_SelectedIndexChanged() event did not work?

G

Guest

Hello, friends,

In my asp.net 1.1 app, I had a dropdownlist web control. It was populated
with user names. I then implemented its

private void ddlUser_SelectedIndexChanged(object sender, System.EventArgs e)

event. In this event, based on user's selection, all available items for
this selected user will be populated in a list box:

this.lstAvailable.Items.Clear();
foreach (System.Data.DataRow dr in mDataSet.Tables[0].Rows)
{
this.lstAvailable.Items.Add(new ListItem(dr["name"].ToString(),
dr["itemID"].ToString()));
}

However, after dropdownlist was populated and one selected a user, this
event was NOT raised. As a result, the available items for this selected user
didn't show in list box.

I then checked the HTML code for this page, I did NOT see onclick() or other
event for the <SELECT> element in those code.

I could not understand: I thought asp.net would generate all these for me.

Any reference paper, sample source code? Thanks a lot.
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top