Skip to main content

Posts

Showing posts with the label color change

To change the background color or to change the inner text of a item in dropdown

To change the background color or to change the inner text of a item in dropdown // Loop around the dropdown for (row = 0; row < ddlUserName.Items.Count; row++) { // To color a particular user name if (ddlUserName.Items[row].Value == this.USERID.ToString()) ddlUserName.Items[row].Attributes.Add("style", "background-color:" + "#663333;color:#ffffff;"); }