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.
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.