Hello everybody,
I as trying to change the selected index of a drop down list. The
relevant pieces of code are shown below.
DropDownListTester CustomerList;
CustomerList = new DropDownListTester("CustomerList", CurrentWebForm);
CustomerList.SelectedIndex = CustomerList.Items.Count - 1; // Selects
last customer in list
The CustomerList is set to AutoPostBack
My problem is that the CustomeList.SelectedIndex remains 0, even though
the CustomerList.Items.Count - 1 evaluates to 10.
I have a feeling that the page is not posting back and so have tried to
use the PostBack() method of the ControlTester, but I can't fugure out
how to use this.
Please advise.
Bryan
--
Tom Veil
to...@fa...
--
http://www.fastmail.fm - Faster than the air-speed velocity of an
unladen european swallow
|