ListItem.Attributes.Add not working
问题 I am trying to add a custom attribute to list item but it is not adding it My code is this ListItem item = new ListItem(teamMemberGroup.Name, teamMemberGroup.ID); item.Attributes.Add("teammembergroup", "true"); ddlTeamGroups.Items.Add(item); ddlTeamGroups1.Items.Add(item); It is only adding option text and value in the Html but no attributes! My dropdown is inside an update panel but I don't think update panel is making something wrong as I am not looking for postback but it is only about the