Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

244
Vistas
how to provide CSS for particular text in select option?

I am using bootstrap select-picker for multi line dropdown and have made slight modifications to enable multiple data columns to be binded in single dropdown.

Now , I want to use different text colour only for data values extracted from database.

Here is my code

 <select name="load" data-toggle="dropdown" class="selectpicker 
show-tick form-control col-lg-12 col-md-12 col-sm-4 col-xs-12" id="cmbID1" data-showContent="true" data-live-search="true" data-live-search-style="startsWith" data-size="10" data-width="350px">
                                <optgroup label="Load details">
                                  <option value="1">No data</option>
                                <asp:Repeater ID="RptLoad" runat= "server">
                                 <ItemTemplate> 
                                  <option value="6" data-divider="true"></option>
                              <option style="white-space:pre-wrap;max-width: 100%;overflow: hidden;word-wrap: normal !important;data-tokens="<%#Eval("Cust_Name")%>" data-content="Customer Name : <%# Eval("Cust_Name")%> <br> Location : <%# Eval("Loc_name") %> <br> Address: <%# Eval("Loc_Address") %> <br> Contact Person : <%# Eval("Loc_ContactP") %> <br> Phone No: <%# Eval("Loc_Phno") %> <br> Email Id : <%# Eval("Loc_Email") %>"><%# Eval("Loc_Id")%>  </option>                            
                             </ItemTemplate>
                              </asp:Repeater>
                                    </optgroup>                                                                                
                         </select>   

                            <script type="text/javascript">                       
                                $('.selectpicker').selectpicker();
                             </script> 

In the above code , I need only the value binded in eval() to be of different colour. for instance:- In the following text "Customer Name : <%# Eval("Cust_Name")%>" , I want Customer Name header in black color and <%# Eval("Cust_Name")%> in blue colour.

Is it possible to achieve this?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Customer Name : <span style="color:blue"><%# Eval("Cust_Name")%></span>                     
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda