Author: supersal | Posted on: 10/8/2008 12:28:49 PM | Views : 438

 Hi everyone.
I am trying to get all the dropdownlists on
a page and then capture the text on the page loads.  Basically
some of the dropdownlists will have values in them populated from a
datasource and some of them
will have <--please select--> in them.  I am wanting to
distinguish between the two when the page loads and set the back color
of the ones which have been populated and have a value in them but
leave the ones that havet <-please select-> in them as the
backcolor white.


 The dropdownlists are all initially on the page and are not created dynamically.
I can get the id of the dropdownlists but not the text. Can anyone help me get the text value?


For Each ctrl As Control In form1.Controls

If TypeOf ctrl Is DropDownList Then

Dim ddl As DropDownList = CType(ctrl, DropDownList)
Dim sid As String = d ...

Go to the complete details ...