我正在尝试在 VisualWebDev 2008 Express 中做一些我认为很简单的事情,但它不起作用。我想显示 XML 文件中的数据,所以我将 XMLDataSource 添加到我的页面,将其指向 XML 文件,然后添加 GridView 并将其连接到数据源。我收到以下错误:GridView - GridView1呈现控件时出错。id 为“GridView1”的 GridView 的数据源没有用于生成列的属性或属性。确保您的数据源有内容。
有人可以告诉我我可能做错了什么吗,TIA Dean
我的 XML 中的一个片段如下:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<Schools xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SchoolProjects>
<Project>6019 - Renaissance MS - New School</Project>
<School>Renaissance MS</School>
<School_Address>7155 Hall Road Fairburn, GA 30213</School_Address>
<Cluster> NS-6019200-LA-01 </Cluster>
<Project_Type>New School</Project_Type>
<Phase>Close-out</Phase>
<Proj_Num>NS-6019200</Proj_Num>
<SqFt>0.000000000000000e+000</SqFt>
<Scope>The construction of the new Renaissance MS will be at the intersection of Jones/Hall Road, in the districts 7th & 9F and Land Lots 117, 143 & 146 of Fulton County, GA. The work includes the construction of the 180,500 square foot building that will house 34 standard classrooms, 12 standard science labs, 20 special purpose classrooms, cafeteria and litchen, gymnasium, media center and administrative offices. The site will also have multi-purpose playfields with track, softball field, tennis courts and basketball/volleyball court.</Scope>
<Project_Manager>Terry O'Brien</Project_Manager>
<PM_Firm>Parsons</PM_Firm>
<AE_Firm>Stevens Wilkinson Stang Newdow</AE_Firm>
<Contractor>Barton Malow</Contractor>
<Start_date xsi:nil="true" />
<End_Date xsi:nil="true" />
<WebAddress></WebAddress>
<Longitude>-84.62242</Longitude>
<Latitude>33.61497</Latitude>
</SchoolProjects>
...
</Schools>