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

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. You receive an instruction from management to create a custom-templated server control. To ensure productivity you need to make sure that the child controls of the newly created server control are identified within the hierarchy of the page. You thus need to identify the interface that will accomplish this.
What should you do?

  1. You should consider implementing the IRequiresSessionState interface.
  2. You should consider implementing the ITemplatable interface.
  3. You should consider implementing the IPostBackDataHandler interface.
  4. You should consider implementing the INamingContainer interface.

Correct Answer: 4


Question: You work as an application developer at Company.com. The previous developer created a Microsoft ASP.NET Web application. Microsoft .NET Framework 3.5 was used to create this application. You detect an unexpected increase in the Application Restarts counter whilst monitoring the application performance counters. You receive an instruction from management to identify the reasons for the increase.
What should you identify? (Choose all that apply.)

  1. The increase occurred due to changes made to the Web.config file in the system.web section for debugging the application.
  2. The increase occurred due to the Microsoft IIS 6.0 host being restarted.
  3. The increase occurred due to an additional code fragment that needs recompilation to the ASP.NET Web application.
  4. The increase occurred due to the Microsoft Windows Server 2003 that hosts the Web application being restarted.
  5. The increase occurred due to an additional new assembly in the Bin directory of the application.
  6. The increase occurred due to HTTP compression being enabled in the Microsoft IIS 6.0 manager for the application.

Correct Answer: 1,3,5


Question: You work as an application developer at Company.com. You make use of Microsoft .NET Framework 3.5 to create an ASP.NET application. The Company.com network contains a web server named Company-SR05. Company-SR05 hosts several Web applications. You want to submit text to a page in the newly created application that is hosted on CompanySR05. The text contains HTML code. You have to make sure that the HTML code is submitted effectively without interfering with the other applications on Company-SR05.
What should you do?

  1. You should consider setting the value below in the Machine.config file:
    <system.web>
    <pages validateRequest=”false”/>
    </system.web>
  2. You should consider adding the attribute below to the @Page directive:
    EnableEventValidation=”true”
  3. You should consider adding the attribute below to the @Page directive:
    ValidateRequest=”true”
  4. You should consider setting the value below in the Web.config file:
    <system.web>
    <pages validateRequest=”false”/>
    </system.web>

Correct Answer: 4


Question: You work as a Web Developer at Company.com. You create a Web application that uses Microsoft ASP.NET 3.5. The application uses session state. The Web application is moved to a Web farm that consists of three Web servers. You should configure the Web application for session state in order to meet the following requirements:

  • The session state data should not be lost if a server in the web farm fails.
  • The session state should be maintained across browser requests by the same user.

You need to configure the Web.config file to meet these requirements. What should you do?

  1. You should use the <sessionState mode=”SQLServer”/> configuration.
  2. You should use the <sessionState mode=”StateServer”/> configuration.
  3. You should use the <sessionState mode=”Custom”/> configuration.
  4. You should use the <sessionState mode=”InProc”/> configuration.

Correct Answer: 1


Question: You work as an application developer at Company.com. You are in the process of creating a Microsoft ASP.NET application that uses Microsoft .NET Framework 3.5. You create a Web page on the application that contains the two XML code below:

<script runat="server">
//add code here
</script>
<asp:ListView ID="lView1" runat="server" DataSourceID="ds1" OnItemDataBound="Oidb" >
<ItemTemplate>
<asp:Label ID="lblTotal" runat="server" Text='<%# Eval("TestScore") %>' />
</ItemTemplate>
</asp:ListView

The application contains a DataSource control named ds1. ds1 is used to obtain information form a Microsoft SQL Server 2005 database table which consists of a column named TestScore. Management wants the TestScore column value to be displayed in red as soon as it is more than three characters.
What should you do?

  1. Your best option would be to insert the code below:
    protected void Oidb(object sender, ListViewItemEventArgs e) {
    Label TestScore = (Label)
    e.Item.FindControl(“TestScore”);
    if (TestScore.Text.Length > 3)
    { TestScore.ForeColor = Color.Red; }
    else
    { TestScore.ForeColor = Color.Black; }
    }
  2. Your best option would be to insert the code below:
    protected void Oidb(object sender, EventArgs e) {
    Label TestScore = new Label();
    TestScore.ID = “TestScore”;
    if (TestScore.Text.Length > 3)
    { TestScore.ForeColor = Color.Red; }
    else
    { TestScore.ForeColor = Color.Black; }
    }
  3. Your best option would be to insert the code below:
    protected void Oidb(object sender, ListViewItemEventArgs e) {
    Label TestScore = (LblTotal)
    e.Item.FindControl(“lblTotal”);
    if (TestScore.Text.Length > 3)
    { TestScore.ForeColor = Color.Red; }
    else
    { TestScore.ForeColor = Color.Black; }
    }
  4. Your best option would be to insert the code below:
    protected void Oidb(object sender, EventArgs e) {
    Label TestScore = new Label();
    TestScore.ID = “lblTotal”;
    if (TestScore.Text.Length > 7)
    { TestScore.ForeColor = Color.Red; }
    else
    { TestScore.ForeColor = Color.Black; }
    }

Correct Answer: 3

Tagged . Bookmark the permalink.

Leave a Reply