Home » [Free] Get all latest Microsoft 70-515 Actual Tests 191-200

[Free] Get all latest Microsoft 70-515 Actual Tests 191-200

Ensurepass

QUESTION 191

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 not displayed in a grid based on a querry string paramater named Product whose ProductName starts with the querry string value.

 

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

 

clip_image001

 

A.

Option A

B.

Option B

C.

Option C

D.

Option D

 

Correct Answer: D

 

 

QUESTION 192

You are developing an ASP.NET Web application.

 

The application includes the following Entity Data Mmodel (EDM)

 

clip_image003

 

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();

 

Correct Answer: D

 

 

QUESTION 193

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

 

A.

Set the EnablePageMethods property of the ScriptManager control to true.

B.

Set the EnablePartialRendering property of the ScriptManager control to true.

C.

Change the WebMethod attribute of the GetServerString method to WebMethod (EnableSession= true).

D.

Declare the GetServerString method as static.

 

Correct Answer: AD

 

 

QUESTION 194

You are developing an ASP.NET Web page. The page includes a DropDownList control. You need to call a client-side function when the user changes the value of the control. Which event should you handle?

 

A.

Click

B.

SelettedIndexChanged

C.

Change

D.

Select

 

Correct Answer: C

 

 

QUESTION 195

You are developing an ASP.NET web application that you will deploy to an Internet Information Services (IIS) 7.0 server. The application will run in Integrated pipeline mode. The application contains a photo gallery of images that are stored in a Microsoft SQL Server database. You need to ensure that the application can retrieve images from the database without blocking IIS worker process threads. What should you do?

 

A.

create a synchronous HttpHandler that is registered in the HttpHandler section in the web config file

B.

asynchronous HttpHandler that is registered in the <handlers> section under system.webserver in the web.config file

C.

Create a custom HttpModule that is registered in the <httpModules> section in the web.config file

D.

Create an asynchronous HttpHandler that is registered in the <HttpHandlers> section in the web.config file

 

Correct Answer: B

 

 

QUESTION 196

You are adding new capabilities to an ASP.NET Web site. The site currently connects to a Microsoft SQL database by using the…. of the CONTOSOAppIdentity account, which has been granted access to only objects within the database.

 

The application requires the following implementation.

 

clip_image005Database objects that support ASP.NET roles must be added to the existing database.

clip_image005[1]The CONTOSOAppIdentity user must be granted only the minimum privileges that are required to support all features of ASP.NET…….

 

You need to add the ASP.NET roles support.

 

Which two actions should you perform?

 

A.

Use the aspnet_regsql tool.

B.

Use the aspnet_regiis tool.

C.

Add the CONTOSOAppIdentity user to the aspnet_Roles_FullAccess database role.

D.

Add the CONTOSOAppIdentity user to the db_accessadmin database role.

 

Correct Answer: AC

 

 

QUESTION 197

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

 

<asp:PlaceHolder ID=”dynamicControls” runat=”server”>

 

<asp:DropDownList ID=”MyDropDown” runat=”server”>

 

<asp:ListItem Text=”abc” value=”abc” />

 

<asp:ListItem Text=”def” value=”def” />

 

</asp:DropDownList>

 

</asp:PlaceHolder>

 

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 Private Sub mydropdown_PreRender(ByVal sender As Object, ByVal e As System.

EventArgs) Handles mydropdown.PreRender

Dim ddl As DropDownList = TryCast(sender, DropDownList) Dim lbl As Label = New Label()

lbl.Text = “Option”

lbl.ID = “Option”

ddl.Controls.Add(lbl)

End Sub

B.

Add the following OnPreRender event handler to the asp:DropDownList Private Sub mydropdown_PreRender(ByVal sender As Object, ByVal e As System.

EventArgs) Handles mydropdown.PreRender

Dim ddl As DropDownList = TryCast(sender, DropDownList) ddl.Items.Add(“Option”)

End Sub

C.

Add the following event handler to the page code-behind. Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

Dim ddl As DropDownList = TryCast(Page.FindControl(“mydropdown”), DropDownList)

Dim lbl As Label = New Label()

lbl.Text = “Option”

lbl.ID = “Option”

ddl.Controls.Add(lbl)

End Sub

D.

Add the following event handler to the page code-behind. Private Sub Page_LoadComplete(ByVal sender As Object, ByVal e As System.

EventArgs) Handles Me.LoadComplete

TryCast(Page.FindControl(“mydropdown”), DropDownList) ddl.Items.Add(“Option”)

End Sub

 

Correct Answer: B

 

 

QUESTION 198

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 based 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>

 

Correct Answer: D

 

 

QUESTION 199

Which directive defines master page-precise attributes that are used by the ASP.NET page parser and compiler?

 

A.

@ MasterType

B.

@ Master

C.

@ PageType

D.

@ MasterPage

 

Correct Answer: B

Explanation:

CHAPTER 2 Using Master Pages, Themes, and Caching Lesson 1: Using Master Pages

Creating a Master Page (page 45)

 

 

QUESTION 200

Which of the following is the correct syntax to specify the path to a file that generates the strong type?

 

A.

<%@ PreviousPageType VirtualPath =”~/MyPage.aspx”% >

B.

<%@ PreviousPageType VirtualPath =”/MyPage.aspx/ ~”% >

C.

<%@ PreviousPageType VirtualPath =”~/MyPage.master”% >

D.

<%@ PreviousPageType VirtualPath =”~/MyPage”% >

 

Correct Answer: A

Explanation:

CHAPTER 5 Input Validation and Site Navigation

Lesson 2: Performing Site Navigation

Accessing Posted Data as Strongly Typed Data (page 249) @ PreviousPageType

(http://msdn.microsoft.com/en-us/library/ms228169.aspx)

 

Instant Access to Download Testing Software & PDF File for Microsoft 70-515 Real Exam

Instant Access to Try Microsoft 70-515 Free Demo

HOT EXAM!

Name of author

Name: admin