Hi,
On the page there is an empty div with id = "Destination". Add an image to this div. Use at least a couple different methods. Explain in which situations each method would be ideal.
Thanks in advance.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
SenthilkumarPosted Mar 19, 2012, 6:20 AM
If you have an requirement to assign the image from the server side. Like you have stored the image in the sql server and if you want to assign that image to div tag from the server side.
The div tag should be given runat="server" in the attribute and you can add the style attribute to the div tag.
We set an background repeat is no repeat.
I hope this helps you to solve your question. Please mark it as "Accepted Answer" if it is useful.
Arjun PanwarPosted Mar 19, 2012, 5:29 AM
SenthilkumarPosted Mar 19, 2012, 12:28 AM
The div tag is allow us to set the image as background to the div control.
It can be set through the css, inline style or javascript.
Method1:
right
Method 2:
If you want to assign the image dynamically from the server side then
Method3:
Inline style in the div tag
Method4:
Change in the javascript
Hope this will answer your question. If it is useful then mark it as "Accepted Answer"