Author: mcarthey | Posted on: 11/24/2008 9:10:08 AM | Views : 287

Hello all!
I have a dropdownlist that I'm adding in the codebehind.  Based upon criteria, I'd like to set the attribute for the added item.  I know I can modify the attributes for a specified item in a similar manner:

DDL.Items[0].Attributes.Add("style", "color:red");
... but I need to reference the specific item added with the following command:
DDL.Items.Add(new ListItem(reader["name"].ToString()));

Basically I need provide a different rowid inst ...

Go to the complete details ...