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?
Customer Name : <span style="color:blue"><%# Eval("Cust_Name")%></span>