BioloMICS logo
×
BioloMICS Web Menu

C field in razor (Multiple select)

 
 
The C field has subfields and each have to be called individually.
 
  • An example of the C field that only shows the subfields that have Yes as a value is explained in the chapter Only show when value is yes.
 
        <tr>
            <td>Colony color - white</td>
            <td>
                <span>@Model.C213.C213_0</span>
            </td>
        </tr>
        <tr>
            <td>Colony color - cream</td>
            <td>
                <span>@Model.C213.C213_1</span>
            </td>
        </tr>
 
 
Extra explanation on the code:
 
  • .C213.C213_0 first call the C field, then call the wanted subfield.
     
 
The code placed in a table:
 
<table class="table">
    <thead>
    </thead>
    <tbody>
        <tr>
            <td>Colony color - white</td>
            <td>
                <span>@Model.C213.C213_0</span>
            </td>
        </tr>
        <tr>
            <td>Colony color - cream</td>
            <td>
                <span>@Model.C213.C213_1</span>
            </td>
        </tr>
    </tbody>
</table>