I have a page that has two copies of the same control in it. The
control is:
BorrowerControl
the two references to it in the page are
bControl1
cobControl1
The control contains a dropdownlist that is populated from xml. I only
bind this data on page_load, not on subsequent postbacks (shouldn't
need to). Code to bind (where this.States is a dataset on the page)
is:
foreach(DataRow d in this.States.Tables[0].Rows)
{
string txt = d["abv"].ToString();
string val = d["abv"].ToString();
li = new ListItem(txt, val);
control.Items.Add(li);
}
control.DataBind();
I'm getting some REALLY strange behavior. The dropdownlist in
bControl1 maintains its values on postback, but the dropdownlist in
cobControl1 does not. I haven't found anything that says I can't have
multiple copies of the same control on the page, or that would explain
this type of erratic behavior. Can someone shed some light on this
situation? I can provide more detail if necessary. And no, I don't
have enableViewState = false on either instance of the control.
Sincerely,
Bryan Ax