Microsoft TS: Web Applications Development with Microsoft .NET Framework 4 - 070-515 Exam Practice Test

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.)

Correct Answer: A,C Vote an answer
You create a Web page named TestPage.aspx and a user control named TestUserControl.ascx. TestPage.aspx uses TestUserControl.ascx as shown in the following line of code.
<uc:TestUserControl ID="testControl" runat="server"/>
On TestUserControl.ascx, you need to add a read-only member named CityName to return the value "New
York".
You also must add code to TestPage.aspx to read this value.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)

Correct Answer: B,D Vote an answer
You are developing an ASP.NET MVC2
application.
You add an area named Admin to the application. Admin contains a controller class name to
MainController.
You create a view named Index outside the Admin area. You need to add a link in the Index view that will
call the Default action.
Wich markup should you use?

Correct Answer: A Vote an answer
You create a custom server control named Task that contains the following code segment. (Line numbers are included for reference only.)
01 namespace DevControls
02 {
03 public class Task : WebControl
04 {
05 [DefaultValue("")]
06 public string Title { ... }
07
08 protected override void RenderContents(HtmlTextWriter output)
09 {
10 output.Write(Title);
11 }
12 }
13 }
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.)

Correct Answer: A,C Vote an answer
You are debugging an ASP.NET web page. The page includes the following method:
[WebMethod]
public string GetServerString()
{
...
}
The page also includes the following markup:
<asp:ScriptManager ID="sm1" runat="server" />
The following JavaScript code is used to call the GetServerString method:
function GetString() { PageMethods.GetServerString(callbackMethod); }
function callbackMethod(str) {
...
}
The AJAX calls to the GetServerString method are failing.
You need to ensure that the AJAX call to the GetServerString method succeeds.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)

Correct Answer: A,D Vote an answer
You are implementing an ASP.NET page.
You add asp:Button controls for Help and for Detail.
You add an ASP.NET skin file named default.skin to a theme.
You need to create and use a separate style for the Help button, and you must use the default style for the
Detail button.
What should you do?

Correct Answer: D Vote an answer
You create a new ASP.NET MVC 2 Web application.
The following default routes are created in the Global.asax.cs file. (Line numbers are included for reference
only.)
01 public static void RegisterRoutes(RouteCollection routes)
02 {
03 routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
05 routes.MapRoute("Default", "{controller}/{action}/{id}", new {controller
= "Home", action = "Index", id = ""});
06 }
You implement a controller named HomeController that includes methods with the following signatures.
public ActionResult Index()
public ActionResult Details(int id)
public ActionResult DetailsByUsername(string username)
You need to add a route to meet the following requirements.
The details for a user must to be displayed when a user name is entered as the path by invoking the
DetailsByUsername action.
User names can contain alphanumeric characters and underscores, and can be between 3 and 20 characters long.
What should you do?

Correct Answer: C Vote an answer
You are implementing a method in an ASP.NET application that includes the following requirements.
Store the number of active bugs in the cache.
The value should remain in the cache when there are calls more often than every 15 seconds.
The value should be removed from the cache after 60 seconds.
You need to add code to meet the requirements. Which code segment should you add?

Correct Answer: C Vote an answer
You create a Web page that contains drop-down menus that are defined by using div tags in the following code.
<div class="dropdown-menu"> <div class="menu-title">Menu One</div> <div class="menu-items" style="display:none;">
<div><a href="#">Item One</a></div>
<div><a href="#">Item Two</a></div>
</div> </div> <div class="dropdown-menu">
<div class="menu-title">Menu Two</div>
<div class="menu-items" style="display:none;">
<div><a href="#">Item Three</a></div>
<div><a href="#">Item Four</a></div>
</div> </div>
You need to write a JavaScript function that will enable the drop-down menus to activate when the user
positions the mouse over the menu title.
Which code segment should you use?

Correct Answer: D Vote an answer
You are perfoming security testing on an existing asp.net web page.
You notice that you are able to issue unauthorised postback requests to the page.
You need to prevent unauthorised post back requests. which page directive you use?

Correct Answer: D Vote an answer
You are developing an ASP.NET Web application.
Application data is stored in a Microsoft SQL Server 2008 database.
You configure a connection string named cnnContoso.
The application must cache the data that is returned from the database by using this connection string.
You need to ensure that the application checks the database every 10 seconds.
What should you do?

Correct Answer: D Vote an answer
You are implementing an ASP.NET page.
The page includes a method named GetCustomerOrderDataSet that returns a DataSet.
The DataSet includes a DataTable named CustomerDetailsTable and a DataTable named
OrderDetailsTable.
You need to display the data in OrderDetailsTable in a DetailsView control named dtlView.
Which code segment should you use?

Correct Answer: C Vote an answer

Contact Us

If you have any question please leave me your email address, we will reply and send email to you in 12 hours.

Our Working Time: ( GMT 0:00-15:00 ) From Monday to Saturday

Support: Contact now 

日本語 Deutsch 繁体中文 한국어