Is there any way to add an image that is loaded from db to a div that already exist in aspx file e.g. if I have the following :
<div id="dp" class="red">
</div>
I cannot use runat=server as my jquery breaks. so I was thinking to somehow find this div and append to it the image.
is this possible, can someone please guide me.
EDIT :
little more info :
So I added a hidden value in aspx file and whenever im loading the page i assign the image in foreach loop.
In my jquery i managed to get the value using
alert($("input[id$=imageval1]").val());
now is there a way to append this to my div above
You could do that with jQuery. This adds the
<img/>as the last child inside#dpwith classred.Here’s the full JavaScript:
Code edited to reflect OP’s edit.