Latest 70-515 Real Exam Download 161-170

Ensurepass

QUESTION 161

ASP.net MVC dotn display a column Using LINQ to SQL class

[MetadataType(typeof(ProductMetadata))] public pertial class Product

{

}

public class ProductMetadata

{

}

A. Add the following attribute to Product class [DisplayColumn("DiscontinueDate","DiscontinueDate",false)

B. Add the following attribute to ProductMetadata class [DisplayColumn("DiscontinueDate","DiscontinueDate",false)

C. Add the following code segment Product class public bool ScaffoldDisable()

{

return false;

}

D. ProductMetaData class

[ScaffoldColumn(false)]

public object DiscontinueDate;

Answer: D


QUESTION 162

You are developing an ASP.NET Web application.

The application must pass an object that contains user-specific data between multiple pages.

The object is more than 100 KB in size when serialized.You need to minimize the amount of data is sent to the user.

What should you do?

A. Pass the object data in a hidden field.

B. Store the object instance in a session variable.

C. Use a cookie that contains the object data.

D. Encode the object data and pass it in a query string parameter.

Answer: B


QUESTION 163

Migration .net 3.5 to 4.0

You have migrated a web application from .net 3.5 to 4.0. the application hat to render same as in .net 3.5.

A. <assembles> someoptions </assembles>

B. <pages controlRenderingCompatibilityVersion="3.5"/>

C. <compilation targetframework = "3.5" />

D. <xhtmlConformance mode="Legacy" />

Answer: B


QUESTION 164

A library called contosobuisness.dll has been created and u need to accept it in a page.. all options had the <%assembly tag but the att differed

A. <%assembly TargetName="contosobuisness" %>

B. <%assembly ID="contosobuisness" %>

C. <%@ Assembly Name="contosobuisness" %>

D. <%assembly virtualpath="contosobuisness" %>

Answer: C


QUESTION 165

You have a master page custom.master. You create a nested.master page using it.

You then have a content page that uses the nested.master as its master page.

Which code would you use to get a string property from custom.master?

A. master.master

B. parent.master

C. this.master

D. unknown

Answer: B


QUESTION 166

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?

A. <%@Page strict = "true" %>

B. <%@Page enableViewStateMac = "true" %>

C. <%@Page EnableEventValidation = "true" %>

D. <%@Page Aspcompact = "true" %>

Answer: C


QUESTION 167

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


QUESTION 168

You’re developing an ASP web page. the pages requires access to types that are defined in an assembly named Contoso.businessobjects.dll.

You need to ensure that the page can access these types.

A. <%@ assembly ID= "Contoso.bussinessobjects" %>

B. <%@ assembly target name= "Contoso.bussinessobjects" %>

C. <%@ assembly name= "Contoso.bussinessobjects" %>

D. <%@ assenbly Virtual Path= "Contoso.bussinessobjects" %>

Answer: C


QUESTION 169

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


QUESTION 170

You are developing an ASP.NET web application. Your designer creates a theme named General for general use in the application.

The designer also makes page-specific changes to the default properties of certain controls. You need to apply the General theme to all pages, and you must ensure that the page-specific customizations are preserved.

What should you do?

A. Add the following configuration to the web.config file.

<configuration>

<system.web>

<pages theme="General"/>

</system.web>

</configuration>

Set the following page directive on pages that have customizations.

<%@ Page EnableTheming="true" %>

B. Add the following configuration to the web.config file.

<configuration>

<system.web>

<pages styleSheetTheme="General"/>

</system.web>

</configuration>

C. Add the following configuration to the web.config file.

<configuration>

<system.web>

<pages theme="General"/>

</system.web>

</configuration>

Set the following page directive on pages that have customizations.

<%@ Page StyleSheetTheme="General" %>

D. Add the following configuration to the web.config file.

<configuration>

<system.web>

<pages theme="General"/>

</system.web>

</configuration>

Set the following page directive on pages that have customizations.

<%@ Page EnableTheming="false" %>

Answer: B

Download Latest 70-515 Real Free Tests , help you to pass exam 100%.