c# - why img tag doesn't display image that i read src from database? -


my code:

<img src="<%dtpath.rows[i][2].tostring();%>"       alt=""       style="width:173px;height:173px;margin:20px 0px 0px 35px;"       class="imagshadow" /> 

how assign value data table src in asp.net?

you need operate base64 encoding, assign it src property of image.

for can see couple of solutions:

  1. you have image encoded in db or on disk (with path in db), donwload , convert base64 encoding via, say, how can encode string base64 in javascript? (there plenty of others)

  2. you prepare on server every image have corresponding file base64 encoding, download , assign image.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -