Tips to Pass 70-515 Exam (46 to 60)

70-515 Royal Pack Testengine pdf

100% Actual & Verified — 100% PASS

Unlimited access to the world's largest Dumps library! Try it Free Today!

Get it now →

Product Description:
Exam Number/Code: 70-515
Exam name: TS: Web Applications Development with Microsoft .NET Framework 4
n questions with full explanations
Certification: Microsoft Certification
Last updated on Global synchronizing

Free Certification Real IT 70-515 Exam pdf Collection

Printable of 70-515 free question materials and testing bible for Microsoft certification for candidates, Real Success Guaranteed with Updated 70-515 pdf dumps vce Materials. 100% PASS TS: Web Applications Development with Microsoft .NET Framework 4 exam Today!

2016 Apr 70-515 Study Guide Questions:

Q46. You are developing an ASP.NET Web page that will display the median value from a sequence of integer values. You need to create an extension method to compute the median value. Which interface should you add the extension method to? 

A. IComparer<T> 

B. IEnumerable<T> 

C. IEnumerator<T> 

D. IEqualityComparer<T> 

Answer: B 


Q47. You are developing an ASP.NET web page. 

You need to ensure that content flows from right to left. 

What should you do? 

A. In the @Page directive, add an attribute named dir with a value of “RightToLeft” 

B. In the @Page directive, add an attribute named dir with a value of “RTL” 

C. In the <html> tag, add an attribute named dir with a value of “RTL” 

D. In the <html> tag, add an attribute named dir with a value of “RightToLeft” 

Answer: C 


Q48. You are deploying an ASP.NET Web application to a remote server. You need to choose a deployment method that will ensure that all IIS settings, in addition to the Web content, will deploy to the remote server. Which deployment method should you choose? 

A. the XCOPY command-line tool 

B. the Copy Web Site tool 

C. the Web Deployment tool 

D. the Publish Web Site utility 

Answer: C 


Q49. You are implementing an ASP.NET MVC 2 Web application that contains the following class. 

public class DepartmentController : Controller { static List<Department> departments = 

new List<Department>(); 


public ActionResult Index() 

return View(departments); 


public ActionResult Details(int id) 

return View(departments.Find(x => x.ID==id)); 


public ActionResult ListEmployees(Department d) 

List<Employee> employees = GetEmployees(d); 

return View(employees); 


You create a strongly typed view that displays details for a Department instance. You want the view to also include a listing of department employees. 

You need to write a code segment that will call the ListEmployees action method and output the results in place. 

Which code segment should you use? 

A. <%= Html.Action("ListEmployees", Model) %> 

B. <%= Html.ActionLink("ListEmployees", "Department", "DepartmentController") %> 

C. <% Html.RenderPartial("ListEmployees", Model); %> 

D. <%= Html.DisplayForModel("ListEmployees") %> 

Answer: A 


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

A. Protected Sub SelectedLanguageChanged(ByVal sender As Object, 

ByVal e As EventArgs) Handles ddlLanguage.SelectedIndexChanged 

Page.UICulture = ddlLanguage.SelectedValue 

End Sub 


B. Protected Overrides Sub InitializeCulture() 

Page.UICulture = Request.Form("ddlLanguage") 

End Sub 


C. Protected Sub Page_Load(ByVal sender As Object, 

ByVal e As System.EventArgs) Handles Me.Load 

Page.Culture = Request.Form("ddlLanguage") 

End Sub 


D. Protected Overrides Sub InitializeCulture() 

Page.Culture = ddlLanguage.SelectedValue 

End Sub 


Answer: B 


70-515 braindumps

Renew 70-515 question:

Q51. You are implementing an ASP.NET page that includes the following down list. 


You need to dynamically add values to the end of the drop-down list. 

What should you do? 

A. Add the following OnPreRender event handler to the asp:DropDownList 

protected void MyDropDown_PreRender(object sender, EventArgs e) 

DropDownList ddl = sender as DropDownList; 

Label lbl = new Label(); 

lbl.Text = "Option"; 


lbl.ID = "Option"; ddl.Controls.Add(lbl); } 

B. Add the following OnPreRender event handler to the asp:DropDownList 

protected void MyDropDown_PreRender(object sender, EventArgs e) 

DropDownList ddl = sender as DropDownList; 

ddl.Items.Add("Option"); 


C. Add the following event handler to the page code-behind. 

protected void Page_LoadComplete(object sender, EventArgs e) 

DropDownList ddl = Page.FindControl("MyDropDown") as DropDownList; 

Label lbl = new Label(); 

lbl.Text = "Option"; 

lbl.ID = "Option"; 

ddl.Controls.Add(lbl); 


D. Add the following event handler to the page code-behind. 

protected void Page_LoadComplete(object sender, EventArgs e) 

DropDownList ddl = Page.FindControl("MyDropDown") as DropDownList; 

ddl.Items.Add("Option"); 


Answer: B 


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

A. dtlView.DataSource = GetCustomerOrderDataSet(); 

dtlView.DataMember = "OrderDetailsTable"; 

dtlView.DataBind(); 


B. dtlView.DataSource = GetCustomerOrderDataSet(); 

dtlView.DataSourceID = "OrderDetailsTable"; 

dtlView.DataBind(); 


C. dtlView.DataSource = GetCustomerOrderDataSet(); 

dtlView.DataKeyNames = new string [] { "OrderDetailsTable"}; 

dtlView.DataBind(); 


D. DataSet dataSet = GetCustomerOrderDataSet(); 

dtlView.DataSource = new DataTable("dataSet", "OrderDetailsTable"); dtlView.DataBind(); 


Answer: A 


Q53. You are implementing an ASP.NET Web site that uses a custom server control named Task. Task is defined as shown in the following list. 

.Class name: Task 

.Namespace: DevControls 

.Assembly: TestServerControl.dll 

.Base class: System.Web.UI.WebControls.WebControl 

You copy TestServerControl.dll to the Web sites Bin folder. 

You need to allow the Task control to be declaratively used on site pages that do not contain an explicit @ Register directive. 

Which configuration should you add to the web.config file? 

A. <appSettings> 

<add key="Dev:Task" 

value="DevControls, DevControls.Task"/> 

</appSettings> 


B. <compilation targetFramework="4.0" explicit="false"> 

<assemblies> 

<add assembly="TestServerControl" /> 

</assemblies> 

</compilation> 


C. <pages> 

<controls> 

<add assembly="TestServerControl" namespace="DevControls" 

tagPrefix="Dev"/> 

</controls> 

</pages> 


D. <pages> 

<tagMapping> 

<add tagType="System.Web.UI.WebControls.WebControl" 

mappedTagType="DevControls.Task"/> 

</tagMapping> 

</pages> 


Answer: C 


Q54. RAG DROP 

You are developing an ASP.NET website that uses multiple layers of themes. 


You want to ensure that attributes will be correctly applied to controls when multiple themes 

specify the same control attribute. 

What is the order of precedence that defines how ASP.NET applies themes? 


Answer: 


Q55. You are implementing an ASP.NET Dynamic Data Web site. The Web site includes a data context that enables automatic scaffolding for all tables in the data model. 

The Global.asax.cs file contains the following code segment. public static void RegisterRoutes(RouteCollection routes) { 

routes.Add(new DynamicDataRoute("{table}/ListDetails.aspx") 

Action = PageAction.List, 

ViewName = "ListDetails", Model = DefaultModel 

}); 

routes.Add(new DynamicDataRoute("{table}/ListDetails.aspx") 

Action = PageAction.Details, 

ViewName = "ListDetails", 

Model = DefaultModel 

}); 

You need to display the items in a table named Products by using a custom layout. What should you do? 

A. Add a new Web page named Products.aspx to the Dynamic Data\PageTemplates folder of the Web site. 

B. Add a new folder named Products to the Dynamic Data\CustomPages folder of the Web site. Add a new Web page named ListDetails.aspx to the Products folder. 

C. Add a new Web user control named Products.ascx to the Dynamic Data\Filters folder of the Web site. In the code-behind file for the control, change the base class from UserControl to System.Web.DynamicData.QueryableFilterUserControl. 

D. Add a new Web user control named Products_ListDetails.ascx to the Dynamic Data\EntityTemplates folder of the Web site. In the code-behind file for the control, change the base class from UserControl to System.Web.DynamicData.EntityTemplateUserControl. 

Answer: B 


70-515 exam guide

Approved 70-515 bible:

Q56. You are developing an ASP.NET Web application. 

The application includes a Icomparer<string> implementation named CaseInsensitiveComparer that compares strings without case sensitivity You add the following method.(Line numbers are included for reference only.) 

01 public IEnumerable<string>SortWords(string[] words) 02 { 

04 } 

You need to sort the array by word length and then by alphabetic order, ignoring case. Which code segment should you add at line 03? 

A. return words.Orderby(a => a, new CaseInsensitiveComparer()).ThenBy(a =>a.Length); 

B. return words.Orderby(a =>a.Length).Orderby(a => a,new CaseInSensitiveComparer()); 

C. return words.Orderby(a =>a.Length).ThenBy(a=> a, new CaseInSensitiveComparer()); 

D. return words.Orderby(a =>a.Length.toString(), new CaseInSensitiveComparer()); 

Answer: C 


Q57. You are developing an ASP.NET MVC 2 application. 

You create a login user control named login.ascx. 

You need to display Login.ascx in a view. 

What should you do? 

A. Use an HTML server-side include. 

B. Use the HTML.Display method 

C. Use the HTML.Partial method. 

D. Use the @Import directive 

Answer: C 


Q58. You are implementing an ASP.NET MVC 2 Web application that allows users to view and edit data. You need to ensure that only logged-in users can access the Edit action of the controller. What are two possible attributes that you can add to the Edit action to achieve this goal? (Each correct answer presents a complete solution. Choose two.) 

A. [Authorize(Users = "")] 

B. [Authorize(Roles = "")] 

C. [Authorize(Users = "*")] 

D. [Authorize(Roles = "*")] 

Answer: AB 


Q59. You have created an ASP.NET server control named ShoppingCart for use by other developers. Some developers report that the ShoppingCart control does not function properly with ViewState disabled. You want to ensure that all instances of the ShoppingCart control work even if ViewState is disabled. What should you do? 

A. Require developers to set EnableViewStateMac to true. 

B. Store state in ControlState instead of ViewState. 

C. Serialize the state into an Application state entry called "MyControl". 

D. Require developers to change the session state mode to SQLServer. 

Answer: B 


Q60. You are implementing an ASP.NET MVC 2 Web application that contains several folders. 

The Views/Shared/DisplayTemplates folder contains a templated helper named Score.ascx that performs custom formatting of integer values. 

The Models folder contains a class named Player with the following definition. 

Public Class Player 

Public Property Name As String 

Public Property LastScore As Integer 

Public Property HighScore As Integer 

End Class 

You need to ensure that the custom formatting is applied to LastScore values when the HtmlHelper.DisplayForModel method is called for any view in the application that has a model of type Player. 

What should you do? 

A. Rename Score.ascx to LastScore.ascx. 

B. Move Score.ascx from the Views/Shared/DisplayTemplates folder to the Views/Player/DisplayTemplates folder. 

C. Add the following attribute to the LastScore property. <UIHint("Score")> 

D. Add the following attribute to the LastScore property. <Display(Name:="LastScore", ShortName:="Score")> 

Answer: C 



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