Hi I've got the following loop:
I keep on getting a cast error, saying that it can't cast to DropDownList. I know there are DropDownList controls within the panel I am looping thru, as I have debugged and seen them in the code watch.
Any ideas?
James.
Code:
foreach (DropDownList ddl in myPanel.Controls)
{
ddl.ClearSelection();
}
I keep on getting a cast error, saying that it can't cast to DropDownList. I know there are DropDownList controls within the panel I am looping thru, as I have debugged and seen them in the code watch.
Any ideas?
James.