0
<div style="height:180px;">
        <table id="tblheader" style="border:none 0px black;width:100%;background:none;">
            <tbody>
                <tr>
                    @{
                         foreach (var ImageDataInfo in Model.JobImages.ImageDataInfo)
                         {
                            <td style="border-bottom: 1px solid #000000;">
                                <img src="@ImageDataInfo.ImageData" 
                                style="width:100px;height:100px;align-content:center;" />
                            </td>
                         }
                     }
                </tr>
            </tbody>
        </table>
    </div>

ImageDataInfo.ImageData is a base64 string. The image does not get loaded. Please help.

Selim Yildiz
  • 5,254
  • 6
  • 18
  • 28

1 Answers1

0

Try this:

<img src="data:image;base64,@System.Convert.ToBase64String(ImageDataInfo.ImageData)" style="width:100px;height:100px;align-content:center;" />
Selim Yildiz
  • 5,254
  • 6
  • 18
  • 28