I'm in the process of modifying code that I didn't write, and I'm pretty new to Razor
This is the selected list of vehicles and the code is as follows:
<select name="selectVehicle" class="cls_vehicles" data-bind="options: $root.vehicles,optionsCaption:$root.noVehicleText, optionsText: 'VehicleNumber',optionsValue: 'VehicleID',value: VehicleID"><option value=""/></select>
In addition to Vehicleid and vehiclelenumber, my data source also contains Vehicletype, and now I want to allocate vehicles according to type, so gasoline vehicles are blue and diesel vehicles are green.
But I have no idea how to do this, any help is greatly appreciated.
source share