Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select From Multiple SQL Server(s)
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00682947
Message ID:
00683004
Views:
24
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>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform