ClientFormat/ ClientFunction for System.Convert.ToBase64String()
I'd like to use some conversion of razor @System.Convert.ToBase64String(@Model.TempPhoto) to display an image (jpg) in a grid. My guess is using ClientFormat or ClientFunction could be a direct way of accomplishing that, but I don't see an example ... what is the best way of getting a byte from ".(TempPhoto)" of the Json response to @System.Convert.ToBase64String() ?
asked at 27 Jul 2018
`ClientFormat` and `ClientFormatFunc` are different ways of generating html inside the grid cell, what value you put in there it is up to you: https://www.aspnetawesome.com/learn/mvc/Grid#Custom-Formatting think you should be generating this Base64 string inside the `Map` in the controller: https://www.aspnetawesome.com/learn/mvc/Grid#Map and after you can just define the format in `ClientFormat`
answered at 27 Jul 2018
to leave an answer