mcts exam 70-515 (196 to 210)

100% Guarantee of 70-515 practice test materials and class for Microsoft certification for IT specialist, 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:

Q196. You are developing an ASP.NET web page. The page includes functionality to make a web request and to display the responde in a specified HTML element. 

You need to add a client-side function to write the response to the specified HTML element.Which function should you add? 

A. function loadData(url,element){ 

$(element).ajaxStart(function(){ 

$(this).text(url); 

}); 


B. function loadData(url,element){ 

$(element).ajaxSend(function(){ 

$(this).text(url); 

}); 


C. function loadData(url,element){ 

$.post(element,function(url){ 

$(element).text(url); 

}); 


D. function loadData(url,element){ 


$.get(url,function(data){ 

$(element).text(data); 

}); 


Answer: D 


Q197. You are developing an ASP.NET web application. 

The application includes a class library named Contoso.dll that will be used by other ASP.Net applications on the same server. 

You need to ensure that only one copy of the class library exists on the server. 

What should you do? 

A. Add the following code segment to the top of each web page. <%@ Register TagPrefix="cc" NameSpace="contoso" Assembly="contoso" %> 

B. Install the class library into the Global Assembly Cache on the server. 

C. Deploy the class library on the App_Code folder 

D. Add the following assembly attribute to the Contoso class library′s AssemblyInfo.cs file. [assembly: AssemblyConfiguration("Shared")] 

Answer: B 


Q198. You are dynamically adding controls to an ASP.NET page in the Page_Load event handler. The page will have text boxes that correspond to the columns in a database table. Each text box will be preceded by a label that displays the name of the corresponding column. 

You need to create the form so that when the user clicks the label, the corresponding text box is selected for input. 

What should you do? 

A. For each column, output the following HTML, where COL is replaced by the name of the 

column. 

<label>COL</label> 

<input name="COL" type="text" id="COL" /> 


B. For each column, output the following HTML, where COL is replaced by the name of the 

column. 

<label AssociatedControlID="COL">COL</label> 

<input name="COL" type="text" id="COL" /> 


C. For each column, create an asp:Label control and a corresponding asp:TextBox that 

have the same ID. 


D. For each column, create an asp:Label control and set the AssociatedControlID to the ID 

of the 

corresponding asp:Textbox control. 


Answer: D 


Q199. You are implementing an ASP.NET application. You add the following code segment. 

Public Function GetNonSecretUsers() As List(Of Person) 

Dim secretUsers() As String = 

{"@secretUser", "@admin", "@root"} 

Dim allpeople As List(Of Person) = GetAllPeople() 

... 

End Function 


You need to add code to return a list of all Person objects except those with a UserId that is contained in the secretUsers list. The resulting list must not contain duplicates. 

Which code segment should you use? 

A. Dim secretPeople = (From p In allpeople From u In secretUsers Where p.UserId = u 

Select p).Distinct() 

Return allpeople.Except(secretPeople) 


B. Return From p In allpeople From u In secretUsers Where p.UserId <> u Select p 

C. Return (From p In allpeople From u In secretUsers Where p.UserId <> u Select p).Distinct() 

D. Dim people As List(Of Person) = New List(Of Person)( From p In allpeople From u In secretUsers Where p.UserId <> u Select p) Return people.Distinct() 

Answer: A 


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

A. Replace the GridView control with a ListView control. 

B. Set the ClientIDMode attribute to Predictable in the web.config file. 

C. Set the ClientIDRowSuffix attribute of each unique GridView control to a different value. 

D. Set the @ OutputCache directives VaryByControl attribute to the ID of the GridView control. 

Answer: C 


70-515 sample question

Down to date braindump 70-515:

Q201. You are developing an ASP.NET web page that includes a textbox control that has ID txtDate. 

You need to ensure that the user enters a valid date in the text box. 

Which markup should you use? 

A. <asp:CompareValidator ID="valDate" runat="server" Type="Date" ControlToCompare="txtDate" Operator="Equal"/> 

B. <asp:CompareValidator ID="valDate" runat="server" Type="Date" ControlToCompare="txtDate" Operator="DataTypeCheck"/> C. <asp:CompareValidator ID="valDate" runat="server" Type="Date" ControlToValidate="txtDate" Operator="DataTypeCheck"/> 

D. <asp:CompareValidator ID="valDate" runat="server" Type="Date" ControlToValidate="txtDate" Operator="Equal"/> 

Answer: C 


Q202. You are developing an ASP.NET MVC 2 application. A view contains a form that allows users to submit their first name. You need to display the value that is submitted, and you must ensure that your code avoids cross-site scripting. 

Which code segment should you use? 

A. <%: Model.FirstName%> 

B. <%= Model.FirstName %> 

C. <% Response.Write(Model.FirstName)%> 

D. <% Response.Write(HttpUtility.HtmlDecode( Model.FirstName))%> 

Answer: A 


Q203. You are creating an ASP.NET Web application. The application must call a WCF service by using a WCF routing service. You need to ensure that the application can invoke the target service by using the router endpoint. 

What should you do? 

A. Add a service reference to the router service. In the client binding configuration, specify the address of the router service. 

B. Add a service reference to the target service. In the client binding configuration, specify the address of the target service. 

C. Add a service reference to the router service. In the client binding configuration, specify the address of the target service. 

D. Add a service reference to the target service. In the client binding configuration, specify the address of the router service. 

Answer: D 


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

A. Replace the GridView control with a ListView control. 

B. Set the ClientIDMode attribute to Predictable in the web.config file. 

C. Set the ClientIDRowSuffix attribute of each unique GridView control to a different value. 

D. Set the @ OutputCache directives VaryByControl attribute to the ID of the GridView control. 

Answer: C 


Q205. You are developing an ASP.Net web application. 

The application includes a master page named CustomerMaster.master that contains a public string property name EmployeeName application also includes a second master page named NestedMaster.master that is defined by the following directive. 

<%@ Master Language="C#" 

MasterPageFile="~/CustomMaster.Master" 

CodeBehind="NestedMaster.Master.cs" 

Inherits="MyApp.NestedMaster"%> 

You add a content page that uses the NestedMaster.master page file.The content page contains a label control named lblEmployeeName. 

You need to acces the EmployeeName value and display the value within the lblEmployeeName label. 

What should you do? 

A. Add the following code segment to the code-behind file of the content page. 

public void Page_load(object s, EventArgs e) 

lblEmployeeName.text= 

((MyApp.CustomMaster)Page.Master.Parent).EmployeeName; 


B. Add the following directive to the content page. 

<%@ MasterTypeVirtualPAth="~/CustomMaster.master" %> 


Add the following code segment to the code-behind file of the content page. 

public void Page_load(object s, EventArgs e) 

lblEmployeeName.text=this.Master.EmployeeName; 


C. Add the following code segment to the code-behind file of the content page. 

public void Page_load(object s, EventArgs e) 

lblEmployeeName.text= 

((MyApp.CustomerMaster)Page.Master.Master).EmployeeName; 


D. Add the following code segment to the code-behind file of the content page. 

public void Page_load(object s, EventArgs e) 

lblEmployeeName.text= 

((MyApp.CustomerMaster)Page.Master.Master) 

.FindControl("EmployeeName").toString(); 

Answer: C


70-515 free practice test

Accurate 70-515 study material:

Q206. You are implementing an ASP.NET Web page. 

You need to add a text box that allows only values between 1 and 10, inclusive, to be submitted. 

Which two code segments should you use? (Each correct answer presents part of the solution. Choose two.) 

A. <script type="text/javascript"> 

function validate_value(obj, args) { 

return 

(args.Value >= 1 && args.Value <= 10); 

</script> 


B. <script type="text/javascript"> 

function validate_value(obj, args) { 

args.IsValid = 

(args.Value >= 1 && args.Value <= 10); 

</script> 


C. <asp:TextBox ID="txt1" runat="server" /> 

<asp:CustomValidator ID="val1" runat="server" 

ControlToValidate="txt1" 

ClientValidationFunction="validate_value" 

ErrorMessage="Value invalid" /> 


D. <asp:TextBox ID="txt1" runat="server" onChange="validate_value(this, args)" /> 

Answer: BC 


Q207. 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 void SelectedLanguageChanged(object sender, EventArgs e) { 

Page.UICulture = ddlLanguage.SelectedValue; 


B. protected override void InitializeCulture() 

Page.UICulture = Request.Form["ddlLanguage"]; 


C. protected void Page_Load(object sender, EventArgs e) 

Page.Culture = Request.Form["ddlLanguage"]; 


D. protected override void InitializeCulture() 

Page.Culture = ddlLanguage.SelectedValue; 


Answer: B 


Q208. You are implementing an ASP.NET page in an e-commerce application. Code in a btnAddToCart_Click event handler adds a product to the shopping cart. The page should check the status of the shopping cart and always show a cart icon when one or more items are in the shopping cart. The page should hide the icon when the shopping cart has no items. You need to add an event handler to implement this requirement. 

Which event handler should you add? 

A. btnAddToCart_Click 

B. Page_Load 

C. Page_PreRender 

D. Page_PreInit 

Answer: C 


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


Q210. You are implementing an ASP.NET Web site. The Web site contains a Web service named ProductService . The code-behind file for the ProductService class contains the following code segment. 

public class ProductService : System.Web.Services.WebService { public List<Product> GetProducts( int categoryID ) { return GetProductsFromDatabase(categoryID); } } You need to ensure that the GetProducts method can be called by using AJAX. 

Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.) 

A. Apply the WebService attribute to the ProductService class. 

B. Apply the ScriptService attribute to the ProductService class. 

C. Apply the WebMethod attribute to the GetProducts method. 

D. Apply the ScriptMethod attribute to the GetProducts method. 

Answer: BC 



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

Microsoft 70-515 Certification Sample Questions and Answers: http://www.braindumpsall.net/70-515-dumps/

P.S. New 70-515 dumps PDF: http://www.4easydumps.com/70-515-dumps-download.html