Exam 70-562 : Microsoft .NET Framework 3.5, ASP.NET Application Development – 7

Question: You work as an application developer at Company.com. You are in the process of creating an Asp.Net application that uses Microsoft .NET Framework 3.5. The application is hosted on a Microsoft IIS 6.0 server named Company-SR01. You receive several requests from management to set up Company-SR01 for remote debugging. You need to make use of Company-WS01 in order to debug the application remotely.
What should you do?

  1. This can be accomplished by attaching Microsoft Visual Studio.NET to the inetinfo.exe process.
  2. This can be accomplished by attaching Microsoft Visual Studio.NET to the Msvsmon.exe process.
  3. This can be accomplished by attaching Microsoft Visual Studio.NET to the WebDev.WebServer.exe process.
  4. This can be accomplished by attaching Microsoft Visual Studio.NET to the w3wp.exe process.

Correct Answer: 4


Question: You work as a Web Developer at Company.com. Company.com makes use of Microsoft ASP.NET 3.5. You are using Microsoft ASP.NET 3.5 to implement a server control named ExamSurvey. ExamSurvey will display survey questions. ExamSurvey need to support data binding and paging. You need to ensure that you are able to page information using a DataPager control. You decide to create the class declaration for the control. Identify the code segment you need to use?

  1. You should use the following code segment:
    [DataObject]
    public class ExamSurvey : WebControl
    { }
  2. You should use the following code segment:
    public class ExamSurvey : DataPager, IDataItemContainer
    { }
  3. You should use the following code segment:
    public class ExamSurvey : DataBoundControl, IPageableItemContainer
    { }
  4. You should use the following code segment:
    [DataObject]
    public class ExamSurvey : Control
    { }

Correct Answer: 3


Question: You work as the application developer at Company.com. You make use of Microsoft ASP.NET 3.5 to create a Web application. In order to display the product images on the page you decide to make use of the ListView control. It is important that you render every image as a column in a table. Identify the declaration that should be used?

  1. You should consider using:
    <asp:ListView runat=”server” ItemPlaceholderID=”listItem”>
    <LayoutTemplate>
    <table>
    <tr id=”listItem”/>
    <td>
    <asp:Image ImageUrl='<%# Eval(“Image”) %>’ />
    </td>
    </tr>
    </table>
    </LayoutTemplate>
    </asp:ListView>
  2. You should consider using:
    <asp:ListView runat=”server” ItemPlaceholderID=”listItem”>
    <LayoutTemplate>
    <table>
    <tr id=”listItem”/>
    <td>
    <asp:Image ImageUrl='<%# Eval(“Image”) %>’ />
    </td>
    </tr>
    </table>
    </LayoutTemplate>
    </asp:ListView>
  3. You should consider using:
    <asp:ListView runat=”server”>
    <LayoutTemplate>
    <table runat=”server”>
    <tr id=”listItem” runat=”server”/>
    </table>
    </LayoutTemplate>
    <ItemTemplate>
    <td runat=”server”>
    <asp:Image ImageUrl='<%# Eval(“Image”) %>’ />
    </td>
    </ItemTemplate>
    </asp:ListView>
  4. You should consider using:
    <asp:ListView runat=”server” ItemPlaceholderID=”listItem”>
    <LayoutTemplate>
    <table runat=”server”>
    <tr id=”listItem” runat=”server”/>
    </table>
    </LayoutTemplate>
    <ItemTemplate>
    <td runat=”server”>
    <asp:Image ImageUrl='<%# Eval(“Image”) %>’ />
    </td>
    </ItemTemplate>
    </asp:ListView>

Correct Answer: 4


Question: You work as a Web Developer at Company.com. Company.com makes use of Microsoft ASP.NET 3.5. You create a Web application that uses Microsoft ASP.NET 3.5. The Web application contains the following class:

public class Certs
{
public string Title {get; set;}
public string Number { get; set; }
public string Vendor { get; set; }
}

You create an instance of List<Certs> named CKCertsList. You also create a DropDownList control named certData. You have to make sure that certData is bound to the CKcertList instance and that every Exam instance will display the Title property. You decide to write code in order to bind the certData control to the CKCertsList instance. Identify the code segment that should be used?

  1. You should use the code segment:
    certData.DataSource = CKcertList;
    certData.DataValueField = “Exam.Title”;
    certData.DataBind();
  2. You should use the code segment:
    certData.DataSource = CKcertList;
    certData.DataTextField = “Title”;
    certData.DataBind();
  3. You should use the code segment:
    certData.DataSource = CKcertList;
    certData.DataMember = “Title”;
    certData.DataBind();
  4. You should use the code segment:
    certData.DataSourceID = “CKcertList”;
    certData.DataTextFormatString = “Exam.Title”;
    certData.DataBind();

Correct Answer: 2


Question: You are the newly appointed Web Application Developer at Company.com. You make use of Microsoft .NET Framework 3.5 to create a Microsoft ASP.NET application. The application contains a DataSource control named KingDataSource. You add a Web form to the application and add the subsequent code:

<asp:Repeater ID="rept1" runat="server" DataSourceID="ds1" ItemDataBound="rept1_bnd">
<ItemTemplate>
<asp:Label ID="lblQty" runat="server" Text='<%# Eval("Qty") %>' />
</ItemTemplate>
</asp:Repeater>

ds1 obtains the Qty column values from a table named CKItems. In order to create the rept1_bnd event handler you need to write the code below. (The line numbers is included for reference purposes)
1 Protected Sub rept1_bnd(ByVal sender As Object, ByVal e As RepeaterItemEventArgs)
2
3 If lbl1 IsNot Nothing Then
4 If Integer.Parse(lbl1.Text) < 10 Then
5 lbl1.ForeColor = Color.Red
6 End If
7 End If
8 End Sub
You receive an instruction from management to obtain a reference to the lblQuantity Label control into a variable named lbl1. You should thus determine the appropriate code that should be added at line 2.

  1. Your best choice would be to add:
    Dim lbl2 As Label = TryCast(Page.FindControl(“lblQty”), Label)
  2. Your best choice would be to add
    Dim lbl2 As Label = TryCast(e.Item.FindControl(“lblQty”), Label)
  3. Your best choice would be to add:
    Dim lbl2 As Label = TryCast(e.Item.Parent.FindControl(“lblQty”), Label)
  4. Your best choice would be to add:
    Dim lbl2 As Label = TryCast(rptData.FindControl(“lblQty”), Label)

Correct Answer: 2

Tagged . Bookmark the permalink.

Leave a Reply