PrepAway - Latest Free Exam Questions & Answers

<?xml version="1.0" encoding="utf-8" ?

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework
version 3.5.You add an XmlDataSource control named XmlDataSource1 to the Web page.
XmlDataSource1 is bound to an XML document with the following structure.
<?xml version=”1.0″ encoding=”utf-8″ ?>
<clients>
<client ID=”1″ Name=”John Evans” />
<client ID=”2″ Name=”Mike Miller”/>

</clients>
You also write the following code segment in the code-behind file of the Web page.
protected void BulletedList1_Click(object sender, BulletedListEventArgs e) {
//…
}
You need to add a BulletedList control named BulletedList1 to the Web page that is bound
to XmlDataSource1.Which code fragment should you use?

PrepAway - Latest Free Exam Questions & Answers

A.
<asp:BulletedList ID=”BulletedList1″ runat=”server” DisplayMode=”LinkButton”
DataSource=”XmlDataSource1″ DataTextField=”Name” DataValueField=”ID”
onclick=”BulletedList1_Click”>
</asp:BulletedList>

B.
<asp:BulletedList ID=”BulletedList1″ runat=”server” DisplayMode=”HyperLink”
DataSourceID=”XmlDataSource1″ DataTextField=”Name” DataMember=”ID”
onclick=”BulletedList1_Click”>
</asp:BulletedList>

C.
<asp:BulletedList ID=”BulletedList1″ runat=”server” DisplayMode=”LinkButton”
DataSourceID=”XmlDataSource1″ DataTextField=”Name” DataValueField=”ID”
onclick=”BulletedList1_Click”>
</asp:BulletedList>

D.
<asp:BulletedList ID=”BulletedList1″ runat=”server” DisplayMode=”HyperLink”
DataSourceID=”XmlDataSource1″ DataTextField=”ID” DataValueField=”Name”
onclick=”BulletedList1_Click”>
</asp:BulletedList>


Leave a Reply