PrepAway - Latest Free Exam Questions & Answers

Category: 70-515

Exam 70-515: TS: Web Applications Development with Microsoft .NET Framework 4

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 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?

What should you do?

You are creating an ASP.NET Web site.
The site has a master page named Custom.master.
The code-behind file for Custom.master contains the following code segment.

public partial class CustomMaster : MasterPage
{
public string Region
{
get; set;
}

protected void Page_Load(object sender, EventArgs e)
{
}
}

You create a new ASP.NET page and specify Custom.master as its master page.
You add a Label control named lblRegion to the new page.
You need to display the value of the master page’s Region property in lblRegion.
What should you do?

What should you do?

You are implementing an ASP.NET application that includes a page named TestPage.aspx.
TestPage.aspx uses a master page named TestMaster.master.
You add the following code to the TestPage.aspx code-behind file to read a TestMaster.master public property named CityName.

protected void Page_Load(object sender, EventArgs e)
{
string s = Master.CityName;
}

You need to ensure that TestPage.aspx can access the CityName property.
What should you do?

What should you do?

You are implementing an ASP.NET application that uses data-bound GridView controls in multiple pages.
You add JavaScript code to periodically update specific types of data items in these GridView controls.
You need to ensure that the JavaScript code can locate the HTML elements created for each row in these GridView controls, without needing to be changed if the controls are moved from one page to another.
What should you do?


Page 11 of 11« First...7891011