Loading images from XML in ASP.NET

sancheztan

New Member
I have this XML file, say (Sample.xml)\[code\]<?xml version="1.0" encoding="utf-8" ?><drinks> <drink> <type>Coke </type> <image>some.jpg or (url) </image> <price> $5 </price> </drink> <drink> <type>Pepsi</type> <image>some.jpg or (url) </image> <price> $2 </price> </drink> </drinks>\[/code\]I have a list box too, which is binded to the XML file.\[code\]<asp:ListBox ID="ListBox1" runat="server" AutoPostBack="True" DataSourceID="XmlDataSource2" DataTextField="drinks/drink/type" Height="198px" Width="181px"> </asp:ListBox> <asp:XmlDataSource ID="XmlDataSource2" runat="server" DataFile="~/XMLFile.xml"> </asp:XmlDataSource>\[/code\]How can I do this? Well, to explain my problem clearly, I want to do this, Products and links to images should load from an xml file (images should be url
 
Back
Top