Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select From Multiple SQL Server(s)
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00682947
Message ID:
00683004
Vues:
25
Mario

I built my XML file and tried to do the binding, but I'm getting the following error:
Exception Details: System.Web.HttpException: DataBinder.Eval: 'System.Data.DataRowView' does not contain a property with the name ServerName.

I'm not sure how to specify what the fields are.
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
     Dim oData As New DataSet()
     oData.ReadXml("c:\ServerData.xml")
     Me.DropDownList1.DataSource = oData
     Me.DropDownList1.DataValueField = "ServerName"
     Me.DropDownList1.DataTextField = "ServerName"
     Page.DataBind()

End Sub
XML File Contents
<?xml version="1.0" encoding="Windows-1252"?>
<!-- edited with XML Spy v4.4 U (http://www.xmlspy.com) by Kirk Kelly (CQI) -->
<configuration>
	<SERVERNAME>CQI-TERMSERV</SERVERNAME>
	<SERVERNAME>(LOCAL)</SERVERNAME>
</configuration>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform