2

Is there a way to style only the first word of an ASP.net DropDown list item?

For example:

<asp:DropDownList ID="ddCategory" runat="server">
    <asp:ListItem Value="0" Selected="True" Text=""></asp:ListItem>
    <asp:ListItem Value="1">**Other** (Something/Notething)</asp:ListItem>
    <asp:ListItem Value="2">**Life** (Love/Hate)</asp:ListItem>
    <asp:ListItem Value="3">**Companies** (Apple/Samsung)</asp:ListItem>
    <asp:ListItem Value="4">Cars (Toyota/Honda)</asp:ListItem>
    <asp:ListItem Value="5">Flowers (Roses/Lillies)</asp:ListItem>
    <asp:ListItem Value="6">Desires (Pitbull/Hotdog)</asp:ListItem>
</asp:DropDownList>

Is there a way to style (bold) the main words not in parenthesis?

And no this is not a Duplicate of Styling part of the OPTION text. Nothing on there matches this. I have tried putting the desired words in tags.

7huan
  • 105
  • 10

0 Answers0