I have a ASPX page where I use many images and also same image many times. So I thought of storing the images in xml and then using the images. I am new to xml. Below is the xml part. How do I call the images from xml to my ASPX page? Any ideas or link will be helpful.
<?xml version="1.0" encoding="utf-8"?>
<ImagesXml>
<Ad>
<ImageUrl>~/Images/image1.jpg</ImageUrl>
<AlternateText>Img1</AlternateText>
</Ad>
<Ad>
<ImageUrl>~/Images/image2.png</ImageUrl>
<AlternateText>img2</AlternateText>
</Ad>
</ImagesXml>
Below is my ASPX page where I am using the image url in div.
<body id="bdy">
<form id="form1" runat="server">
<div id="invoice" runat="server" style="background: url('Images/image1.jpg');">
<asp:TextBox ID="TextBox1" runat="server" ForeColor="Black"></asp:TextBox>
<center>
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="Send Mail" OnClick = "Button1_Click" />
</center>
</div>
</form>
</body>
Now you only need to do something with the strings retrieved in the loop