Question:You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
You create a file named movies.xml that contains the following code fragment:
<Movies>
<Movie ID="1" Name="Movie1" Year="2006">
<Desc Value="Movie desc"/>
</Movie>
<Movie ID="2" Name="Movie2" Year="2007">
<Desc Value="Movie desc"/>
</Movie>
<Movie ID="3" Name="Movie3" Year="2008">
<Desc Value="Movie desc"/>
</Movie>
</Movies>
You add a Web form to the application.
You write the following code segment in the Web form:
01 <form runat="server">
02 <asp:xmldatasource
03 id="XmlDataSource1"
04 runat="server"
05 datafile="movies.xml" />
06 â–º
07 </form>
You need to implement the XmlDataSource control to display the XML data in a TreeView control.
Which code segment should you insert at line 06?
A <asp:TreeView ID="TreeView1" runat="server" DataSourceID="XmlDataSource1">
<DataBindings>
<asp:TreeNodeBinding DataMember="Movie" Text="Name" />
</DataBindings>
</asp:TreeView>
B <asp:TreeView ID="TreeView1" runat="server" DataSourceID="XmlDataSource1">
<DataBindings>
<asp:TreeNodeBinding DataMember="Movies" Text="Desc" />
</DataBindings>
</asp:TreeView>
C <asp:TreeView ID="TreeView1" runat="server" DataSourceID="MovDataSource1">
<DataBindings>
<asp:TreeNodeBinding DataMember="Movie" Text="Name" />
</DataBindings>
</asp:TreeView>
D <asp:TreeView ID="TreeView1" runat="server" DataSourceID="MovDataSource1">
<DataBindings>
<asp:TreeNodeBinding DataMember="Movies" Text="Desc" />
</DataBindings>
</asp:TreeView>