add texts and images on a image

Please, help me.

I'm using asp.net 2.0. 

I have a problem that: I have an weather background image. I need to add text (like temperature) and 'icon image' (like rainy, sunny ..) on background image. I don't want to use Graphics object to draw text on background.

  It looks like this page: http://www.metservice.co.nz/default....php?alias=home

I'm thinking about using divs on div.


If is there anyway to do it, or a custom control, please show me. 

Thanks in advances.

0
papillonhn
2/18/2008 4:03:32 AM
asp.net.getting-started 91979 articles. 4 followers. Follow

4 Replies
821 Views

Similar Articles

[PageSpeed] 31

Hello To do so

 Add a Div Tag

Set the style property and set the background image of the Div Tag

Inside the Div  tag add the Image control of asp.net to show the icon

Set the Alternate text property of image control to show the text

here is the sample code

<div style="width: 274px; height: 226px;background-image:'logo.jpg'">

<asp:Image ID="Image1" runat="server" AlternateText="Sample Text" ImageUrl="~/Nitu/Extra/logo1.jpg" /></div>

 

0
nitukothari
2/18/2008 5:49:41 AM

Try to insert a div. Then set the weatger image as div background. So now you can append any thing within div object programetically/hardcoded. Also you can change runtime the div ground.


Shawpnendu Bikash Maloroy
http://shawpnendu.blogspot.com
0
shawpnendu
2/18/2008 5:50:51 AM

Hi,

There is a sample for your purpose.

http://aspnet.4guysfromrolla.com/articles/030205-1.aspx It will lead you how to retrieve the weather information and how to create weather image and temperature text.

You can get the weather information via web service http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl

Another regarding link is http://aspalliance.com/1121_Display_Local_Weather_Data_On_Your_Site.all

Hope it helps.



Vince Xu
Microsoft Online Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
0
Vince
2/19/2008 4:59:16 AM

Thank you very much. Especial to Vince Xu - MSFT.

0
papillonhn
2/19/2008 6:50:28 AM
Reply: