troubleshooting Question

How can I display XML Data on a DetailsView ?

Avatar of darcosys
darcosys asked on
ASP.NETVisual Basic.NET
7 Comments1 Solution1812 ViewsLast Modified:

I want to display the information of a XML in a VB.NET (ASP.NET)  DetailsView control but I cannot solve it.

this one is the XML:

<?xml version="1.0" encoding="UTF-8" ?>
    <region code="IL">israel</region>
    <bases com="0" env="0" ind="27" sec="0" tra="7" />

I must read it from this link:

My Code:
        <asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile=""></asp:XmlDataSource>

        <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" DataSourceID="XmlDataSource1" Height="50px" Width="125px">
                <asp:BoundField DataField="host" HeaderText="host" />
                <asp:BoundField DataField="name" HeaderText="name" />
                <asp:BoundField DataField="ranking" HeaderText="ranking" />

A field or property with the name 'host' was not found on the selected data source.

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 7 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros