70-515 study material (196 to 210)

70-515 Royal Pack Testengine pdf

100% Actual & Verified — 100% PASS

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

https://www.exambible.com/70-515-exam/

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

Exam Code: 70-515 (Practice Exam Latest Test Questions VCE PDF)
Exam Name: TS: Web Applications Development with Microsoft .NET Framework 4
Certification Provider: Microsoft
Free Today! Guaranteed Training- Pass 70-515 Exam.

2016 May 70-515 Study Guide Questions:

Q196. You are creating an ASP.NET Web site. The site is configured to use Membership and Role management providers. 

You need to check whether the currently logged-on user is a member of a role named Administrators. 

Which code segment should you use? 

A. Dim isMember As Boolean = 

Roles.GetUsersInRole ("Administrators").Any() 


B. Dim isMember As Boolean = 

Membership.ValidateUser ( User.Identity.Name , "Administrators") 


C. Dim isMember As Boolean = 

Roles.GetRolesForUser ("Administrators").Any () 


D. Dim isMember As Boolean = User.IsInRole ("Administrators") 


Answer: D 


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

The application includes the following Entity Data Model (EDM): 


You instantiate an ObjectContext for the EDM named context. 

You need to find the total number of addresses that are associated with customers that have a non-null middle name. 

Which LINQ to Entities query should you use? 

A. var query = context.Customers 

.Where(c => c.MiddleName != null) 

.Select(c => c.CustomerAddresses.Count(); 


B. var query = context.Customers 

.Where(c => c.MiddleName != null) 

.SelectMany(c => c.CustomerAddresses.Count(); 


C. var query = context.Addresses 

.SelectMany(a => a.CustomerAddresses.OfType<Customer>() 

.Where(c => c.MiddleName != null)).Count(); 


D. var query = context.Addresses 

.GroupBy(a => a.CustomerAddresses 

.Where(ca => ca.Customer.MiddleName != null)).Count(); 


Answer: B 


Q198. A Web page includes the HTML shown in the following code segmen <span id="ref"> 

<a name=Reference>Check out</a> 

the FAQ on 

<a href="http://www.contoso.com"> 


Contoso</a>'s web site for more information: 

<a href="http://www.contoso.com/faq">FAQ</a>. 

</span> 

<a href="http://www.contoso.com/home">Home</a> 

You need to write a JavaScript function that will dynamically format in boldface all of the hyperlinks in the ref span. 

Which code segment should you use? 

A. $("#ref").filter("a[href]").bold(); 

B. $("ref").filter("a").css("bold"); 

C. $("a").css({fontWeight:"bold"}); 

D. $("#ref a[href]").css({fontWeight:"bold"}); 

Answer: D 


Q199. You are implementing an ASP.NET Web site. The site uses a component that must be dynamically configured before it can be used within site pages. 

You create a static method named SiteHelper.Configure that configures the component. 

You need to add a code segment to the Global.asax file that invokes the SiteHelper.Configure method the first time, and only the first time, that any page in the site is requested. 

Which code segment should you use? 

A. Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs) 

SiteHelper.Configure() 

End Sub 


B. Sub Application_Init(ByVal sender As Object, ByVal e As EventArgs) 

SiteHelper.Configure() 

End Sub 


C. Sub Application_BeginRequest(ByVal sender As Object, 

ByVal e As EventArgs) 

SiteHelper.Configure() 

End Sub 


D. Dim lockObject As Object = New Object() 

Sub Application_BeginRequest(ByVal sender As Object, 

ByVal e As EventArgs) 

SyncLock (lockObject()) 

SiteHelper.Configure() 

End SyncLock 

End Sub 


Answer: A 


Q200. You are testing an existing ASP.NET page. The page includes a text You are able to execute malicious JavaScript code by typing it in the text box and submitting. You need to configure the page to prevent JavaScript code from being submitted by the text box. In the @ Page directive, which attribute should you set to true? 

A. the EnableEventValidation attribute 

B. the ResponseEncoding attribute 

C. the ValidateRequest attribute 

D. the Strict attribute 

Answer: C 


70-515

Rebirth exam certification 70-515:

Q201. You create a Web page that contains the following image element. 

<img id="myImage" src="/image1.png" /> 

You need to write a JavaScript function that will dynamically change which image is displayed. The function must be compatible across different browsers. 

Which code segment should you use? 

A. function changeImage() { 

myImage.src = "image2.png"; 


B. function changeImage() { 

document.getElementById("myImage").src = 

"image2.png"; 


C. function changeImage() { 

getElementById("myImage").src = 

"image2.png"; 


D. function changeImage() { 

window.getElementById("myImage").src = 

"image2.png"; 


Answer: B 


Q202. You are developing an ASP.NET Web page. The page includes a List(Of Product) instance. You add a FormView control to display a single Product from this list. You need to bind the list to the FormView control. Which FormView property should you set in the code-behind file? 

A. DataSource 

B. DataSourceID 

C. DataKeyNames 

D. DataMember 

Answer: A 


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

The application includes the following Entity Data Mmodel (EDM) 


You instantiate an ObjectContext for the EDM named context 

You need to find the total number of addresses that are assosiated with customers that have a no-null mode. 

Which LINQ to Entities query should you use? 

A. var query = context.Customers 

.Where(c => c.MiddleName != null) 

.Select(c => c.CustomerAddresses.Count(); 


B. var query = context.Customers 

.Where(c => c.MiddleName != null) 

.SelectMany(c => c.CustomerAddresses.Count(); 


C. var query = context.Addresses 

.SelectMany(a => a.CustomerAddresses.OfType<Customer>() 

.Where(c => c.MiddleName != null)).Count(); 


D. var query = context.Addresses 

.GroupBy(a => a.CustomerAddresses 

.Where(ca => ca.Customer.MiddleName != null)).Count(); 


Answer: D 


Q204. You are implementing an ASP.NET Web site. The Web site contains a Web service named CustomerService. 

The code-behind file for the CustomerService 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 


Q205. You are implementing an ASP.NET Web site. The site contains the following class. 

public class Address 

public int AddressType; 

public string Line1; 

public string Line2; 

public string City; 

public string ZipPostalCode; 

The Web site interacts with an external data service that requires Address instances to be 


given in the following XML format. 

<Address AddressType="2"> 

<Line1>250 Race Court</Line1> 


<City>Chicago</City> 

<PostalCode>60603</PostalCode> 

</Address> 

You need to ensure that Address instances that are serialized by the XmlSerializer class meet the XML format requirements of the external data service. 

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

A. Add the following attribute to the AddressType field. [XmlAttribute] 

B. Add the following attribute to the Line2 field. [XmlElement(IsNullable=true)] 

C. Add the following attribute to the ZipPostalCode field. [XmlAttribute("ZipCode")] 

D. Add the following attribute to the ZipPostalCode field. [XmlElement("ZipCode")] 

Answer: AD 


70-515-exam

Accurate exam 70-515:

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

A. Add the following code segment to the project's AssemblyInfo.vb file. <Assembly: TagPrefix("DevControls", "Dev")> 

B. Replace line 06 with the following code segment. <ComponentModel.DefaultValue("New Task")> 

C. Insert the following code segment immediately before line 03. <ToolboxData("<{0}:Task runat=""server"" Title=""New Task"" />")> 

D. Replace line 12 with the following code segment. output.Write("<Dev:Task runat=""server"" Title=""New Task"" />") 

Answer: AC 


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

The page includes the following EntityDataSource control: 

<asp:EntityDataSource ID="EntityDataSource1" runat="server" 

ConnectionString="name=AdventureWorksEntities" 

DefaultContainerName="AdventureWorksEntities" EnableFlattening="False" 

EntitySetName="Products" /> 


The page must filter the data that is displayed in a grid on a query string parameter named ProductPrefix. 

The grid must display products whose ProductName starts with the query string value. 

You need to ensure that the page generates the appropriate database query. 

What should you do? 

A. Add the following element to the EntityDataSource control: 

<WhereParameters> 

<asp:DynamicQueryStringParameter QueryStringField="ProductPrefix" 

Name="ProductName" /> 

</WhereParameters> 


B. Add the following element to the EntityDataSource control: 

<WhereParameters> 

<asp:QueryStringParameter QueryStringField="ProductPrefix" Name="ProductName" /> 

</WhereParameters> 


C. Add the following element to the EntityDataSource control: 

<asp:QueryExtender ID="QueryExtender1" runat="server" 

TargetControlID="EntityDataSource1"> 

<asp:PropertyExpression Name="ProductName" /> 

<asp:DynamicFilterExpression ControlID="ProductPrefix" /> 

</asp:QueryExtender> 


D. Add the following element to the EntityDataSource control: 

<asp:QueryExtender ID="QueryExtender1" runat="server" 

TargetControlID="EntityDataSource1"> 

<asp:SearchExpression SearchType="StartsWith" DataFields="ProductName"> 

<asp:QueryStringParameter QueryStringField="ProductPrefix" /> 

</asp:SearchExpression> 

</asp:QueryExtender> 


Answer: D 


Q208. Which of the following is the correct collection of build events? 

A. Pre-Build, Post-Link, and Pre-Link 

B. Pre-Build, Post-Build, and Post-Link 

C. Pre-Build, Pre-Link, and Post-Build 

D. Post-Link, Pre-Link, and Post-Build 

Answer: C 


Q209. You are implementing an ASP.NET Web site. The site uses a component that must be dynamically configured before it can be used within site pages. 

You create a static method named SiteHelper.Configure that configures the component. 

You need to add a code segment to the Global.asax file that invokes the SiteHelper.Configure method the first time, and only the first time, that any page in the site is requested. 

Which code segment should you use? 

A. void Application_Start(object sender, EventArgs e) 

SiteHelper.Configure(); 


B. void Application_Init(object sender, EventArgs e) 

SiteHelper.Configure(); 


C. void Application_BeginRequest(object sender, EventArgs e) { 

SiteHelper.Configure(); 


D. Object lockObject = new Object(); 

void Application_BeginRequest(object sender, EventArgs e) { 

lock(lockObject()) 

SiteHelper.Configure(); 


Answer: A 


Q210. You are implementing custom ASP.NET server controls. 

You have a base class named RotaryGaugeControl and two subclasses named CompassGaugeControl and SpeedGaugeControl. 

Each control requires its own client JavaScript code in order to function properly. The JavaScript includes functions that are used to create the proper HTML elements for the control. You need to ensure that the JavaScript for each of these controls that is used in an ASP.NET page is included in the generated HTML page only once, even if the ASP.NET page uses multiple instances of the given control. 

What should you do? 

A. Place the JavaScript in a file named controls.js and add the following code line to the 

Page_Load method of each control. 

Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "script", 

"controls.js"); 


B. Add the following code line to the Page_Load method of each control, where 

strJavascript contains the JavaScript code for the control. 

Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "script", 

strJavascript); 


C. Add the following code line to the Page_Load method of each control, where 

CLASSNAME is the name of the control class and strJavascript contains the JavaScript 

code for the control. 

Page.ClientScript.RegisterStartupScript(typeof(CLASSNAME), "script", 

strJavascript); 


D. Add the following code line to the Page_Load method of each control, where 

CLASSNAME is the name of the control class and strJavascript contains the JavaScript 

code for the control. 

Page.ClientScript.RegisterClientScriptBlock(typeof(CLASSNAME), "script", 

strJavascript); 


Answer: D 



see more http://www.pdfcollection.net/70-515-pdf.html
http://www.exambible.com/70-515-exam/