Click here to Skip to main content
15,891,657 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
i am saving image in SQL Server bytes format through input type control
While in editing i am getting bytes, how to bind that image to input control?

is it possible to get image bytes from <image> control ?
Posted

1 solution

Ya we can do it.

Convert those bytes into base64 string and put it into src attribute of image() tag as below
HTML
<img alt="Embedded Image" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIA..." />
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900