mike said:
can somebody please show me some code that will let me populate a
checkboxlist from the xmldatasource, and have the text property set
to the names in the xml file
thanks
With this XML file:
<?xml version="1.0" encoding="utf-8" ?>
<root>
<item value="1" text="Value 1" />
<item value="2" text="Value 2" />
<item value="3" text="Value 3" />
</root>
And this code:
<asp:CheckBoxList ID="CheckBoxList1" runat="server"
DataSourceID="XmlDataSource1"
DataTextField="text" DataValueField="value">
</asp:CheckBoxList><asp:XmlDataSource ID="XmlDataSource1" runat="server"
DataFile="~/Data/XMLFile.xml"></asp:XmlDataSource>
--
AZ [Microsoft - .NET MVP]
Mia Home page:
http://ciclismo.sitiasp.it
Asp.Net community:
http://www.aspitalia.com
Il mio blog:
http://blogs.aspitalia.com/az