Skip to main content
added 1 character in body
Source Link
Rejwanul Reja
  • 1.5k
  • 1
  • 20
  • 20

To retrieve youyour image from byte to base64 string....

Model property:

 public byte[] NomineePhoto { get; set; } public string NomineePhoneInBase64Str { get { if (NomineePhoto == null) return ""; return $"data:image/png;base64,{Convert.ToBase64String(NomineePhoto)}"; } } 

IN view:

 <img style="height:50px;width:50px" src="@item.NomineePhoneInBase64Str" /> 

To retrieve you image from byte to base64 string....

Model property:

 public byte[] NomineePhoto { get; set; } public string NomineePhoneInBase64Str { get { if (NomineePhoto == null) return ""; return $"data:image/png;base64,{Convert.ToBase64String(NomineePhoto)}"; } } 

IN view:

 <img style="height:50px;width:50px" src="@item.NomineePhoneInBase64Str" /> 

To retrieve your image from byte to base64 string....

Model property:

 public byte[] NomineePhoto { get; set; } public string NomineePhoneInBase64Str { get { if (NomineePhoto == null) return ""; return $"data:image/png;base64,{Convert.ToBase64String(NomineePhoto)}"; } } 

IN view:

 <img style="height:50px;width:50px" src="@item.NomineePhoneInBase64Str" /> 
Source Link
Rejwanul Reja
  • 1.5k
  • 1
  • 20
  • 20

To retrieve you image from byte to base64 string....

Model property:

 public byte[] NomineePhoto { get; set; } public string NomineePhoneInBase64Str { get { if (NomineePhoto == null) return ""; return $"data:image/png;base64,{Convert.ToBase64String(NomineePhoto)}"; } } 

IN view:

 <img style="height:50px;width:50px" src="@item.NomineePhoneInBase64Str" />