PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

Which code segment should you use?

You are implementing an ASP.NET Web site. The site allows users to explicitly choose the display
language for the site# s Web pages. You create a Web page that contains a DropDownList named
ddlLanguage, as shown in the following code segment.
<asp:DropDownList ID=”ddlLanguage” runat=”server” AutoPostBack=”True”
ClientIDMode=”Static” OnSelectedIndexChanged=”SelectedLanguageChanged”>
<asp:ListItem Value=”en”>English</asp:ListItem>
<asp:ListItem Value=”es”>Spanish</asp:ListItem>
<asp:ListItem Value=”fr”>French</asp:ListItem>
<asp:ListItem Value=”de”>German</asp:ListItem>
</asp:DropDownList>
The site contains localized resources for all page content that must be translated into the language
that is selected by the user. You need to add code to ensure that the page displays content in the
selected language if the user selects a language in the drop-down list. Which code segment should
you use?

Which code segment should you add?

You are implementing an ASP.NET application that includes the following requirements. Retrieve the
number of active bugs from the cache, if the number is present. If the number is not found in the
cache, call a method named GetActiveBugs, and save the result under the ActiveBugs cache key.
Ensure that cached data expires after 30 seconds. You need to add code to fulfill the requirements.
Which code segment should you add?

Which two actions should you perform?

You create a custom server control named Task that contains the following code segment. (Line
numbers are included for reference only.)
01Namespace DevControls
03 Public Class Task
04 Inherits WebControl
06 <ComponentModel.DefaultValue(“”)>
07 Public Property Title As String
09 Protected Overrides Sub RenderContents(
10 ByVal output As HtmlTextWriter)
12 output.Write(Title)

13 End Sub
15 End Class
17 End Namespace
You need to ensure that adding a Task control from the Toolbox creates markup in the following
format.
<Dev:Task ID=”Task1″ runat=”server” Title=”New Task” />
Which two actions should you perform? (Each correct answer presents part of the solution. Choose
two.)

Which two actions should you perform?

You are implementing an ASP.NET application that makes extensive use of JavaScript libraries. Not
all pages use all scripts, and some scripts depend on other scripts. When these libraries load
sequentially, some of your pages load too slowly. You need to use the ASP.NET Ajax Library Script
Loader to load these scripts in parallel. Which two actions should you perform? (Each correct answer
presents part of the solution. Choose two.)