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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
SenthilkumarRank #387 · 6.5K reputationPosted Mar 18, 2012, 8:28 PM EDT
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
Inline style in the div tag
Method4:
Change in the javascript
Arjun PanwarRank #254 · 9.9K reputationPosted Mar 19, 2012, 1:29 AM EDT
SenthilkumarRank #387 · 6.5K reputationPosted Mar 19, 2012, 2:20 AM EDT
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.