Latest 70-515 Real Exam Download 111-120

Ensurepass

QUESTION 111

You are adding new capabilities to an ASP.NET web site. The site currently connects to a Microsoft SQL Server database by using the credentials

of the CONTOSOAppIdentity account, which has been granted access to only objects within the database.

The application requires the following implementation:

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

clip_image002[1]The ContosoAppIdentity user must be granted only the minimum privileges that are required to support all features of ASP.NET roles.

You need to add the ASP.NET roles support.

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

A. Use the aspnet_regsql tool.

B. Use the aspnet_regiis tool.

C. Add the CONTOSOAppIdentity user to the asp_Roles_FullAccess database role.

D. Add the CONTOSOAppIdentity user to the db_accessadmin database role.

Answer: AC


QUESTION 112

You are developing an ASP.NET templated server control.

You need to ensure that a new ID namespace is created within the page control hierarchy when the control is added to a page.

Which interface should you implement on the control?

A. IDataItemContainer

B. INamingContainer

C. IDataKeysControl

D. IExtenderControl

Answer: B


QUESTION 113

You are implementing an ASP.NET page that includes a text box.

You need to validate values that are typed by users to ensure that only numeric values are submitted.

Which control markup should you use?

A. <asp:TextBox ID="txt1" runat="server" CausesValidation="true" ValidationGroup= "Numeric" />

B. <asp:TextBox ID="txt1" runat="server" EnableClientScript="true" ValidationGroup= "Numeric" />

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

<asp:RegularExpressionValidator ID="val1" runat="server" ControlToValidate="txt1"

ValidationExpression="[0-9]*" ErrorMessage="Invalid input value" />

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

<asp:RegularExpressionValidator ID="val1" EnableClientScript="true" ControlToValidate="txt1" ValidationExpression="[0-9]*" ErrorMessage="Invalid input value" />

Answer: C


QUESTION 114

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.

Answer: AD


QUESTION 115

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

C. Change

D. Select

Answer: C


QUESTION 116

You are developing an ASP.NET AJAX extender control.

The extender includes the following segment.

public class DisabledButtonExtender : ExtenderControlBase

{

[ExtenderControlProperty] public string TargetID

{

get{…}

set{…}

}

}

You need to ensure that the extender can be user to extend only text boxes and that the targetID property can reference only buttons.

What should you do?

A. Apply the following attribute to the class. [ValidationProperty("TextBox")]

Apply the fallowing attribute to TargetID

[Filterable(true)]

B. Apply the following attribute to the class. [TargetControlType(typeof(TextBox))]

Apply the following attribute to TargetID

[Filterable(true)]

C. Apply the following attribute to the class. [ValidationProperty("TextBox")]

Apply the following attribute to TargetID

[IDReferenceProperty(typeof(Button))]

D. Apply the following attribute to the class. [TargetControlType(typeof(TextBox))]

Apply the following attribute to TargetID

[IDReferenceProperty(typeof(Button))]

Answer: D


QUESTION 117

You are updating an ASP.NET Web Application. The application includes the fallowing classes.

public class Supervisor

{

public string FirstName { get; set; } public string LastName { get; set; }

public List<Employee> Employees { get; set; }

}

public class Employee

{

public String FirstName { get; set; } public String LastName { get; set; }

}

An application page contains the fallowing markup.

<asp:Repeater ID="rptSupervisor" runat="server" DataSourceID="odsEmployees">

<ItemTemplate>

<%#Eval("FirstName") %> <%#Eval("LastName") %><br /> Employees:<br />

<asp:Repeater ID="rptEmployees" runat="server">

<ItemTemplate>

<%#Eval("FirstName") %> <%#Eval("LastName") %>

<br />

</ItemTemplate>

</asp:Repeater>

</ItemTemplate>

</asp:Repeater>

<asp:ObjectDataSource ID="odsEmployees" runat="server" SelectMethod="GetSupervisorWithEmployees"

TypeName="BusinessLayer">

</asp:ObjectDataSource>

You need to ensure that the page displays a list of supervisors with their corresponding employees. What should you do?

A. Bind rptEmployees during the OnItemCommand event of rptSupervisor.

B. Bind rptEmployees during the OnItemDataBound event of rptEmployees.

C. Set the rptEmployees DataSourceID attribute to "Employees".

D. Set the rptEmployees DataSource attribute to <%# Eval("Employees") %>

Answer: D


QUESTION 118

You are developing an ASP.NET Web page.

The page uses the MicrosoftAjax.js script file and the MicrosoftAjaxWebForms.js script file. You need to ensure that both scripts are combined into a single script.

Which markup should you use?

A. <asp:ScriptManager ID="sm1" runat="server">

<CompositeScript>

<Scripts>

<asp:ScriptReference Name="MicrosoftAjax.js" />

<asp:ScriptReference Name="MicrosoftAjaxWebForms.js" />

</Scripts>

</CompositeScript>

</asp:ScriptManager>

B. <asp:ScriptManager ID="sm1" runat="server">

<CompositeScript ScriptMode="Auto">

<Scripts>

<asp:ScriptReference Name="MicrosoftAjax.js" />

<asp:ScriptReference Name="MicrosoftAjaxWebForms.js" />

</Scripts>

</CompositeScript>

</asp:ScriptManager>

C. <asp:ScriptManager ID="sm1" runat="server">

<CompositeScript ScriptMode="Release">

<Scripts>

<asp:ScriptReference Name="MicrosoftAjax.js" />

<asp:ScriptReference Name="MicrosoftAjaxWebForms.js" />

</Scripts>

</CompositeScript>

</asp:ScriptManager>

D. <asp:ScriptManager ID="sm1" runat="server">

<Scripts>

<asp:ScriptReference Name="MicrosoftAjax.js" />

<asp:ScriptReference Name="MicrosoftAjaxWebForms.js" />

</Scripts>

</asp:ScriptManager>

Answer: A


QUESTION 119

You are developing an ASP.NET Web application.

The application is configured to use the membership and role providers.

You need to allow all users to perform an HTTP GET for application resources, but you must allow only the user named Moderator to perform a POST operation.

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

A. <authorization>

<deny verbs="GET" users="*"/>

<allow verbs="POST" users="Moderator"/>

<deny verbs="POST" users="*"/>

</authorization>

B. <authorization>

<deny verbs="POST" users="*"/>

<allow verbs="POST" users="Moderator"/>

<allow verbs="GET" users="*"/>

</authorization>

C. <authorization>

<allow verbs="GET" users="*"/>

<allow verbs="POST" users="Moderator"/>

<deny verbs="POST" users="*"/>

</authorization>

D. <authorization>

<allow verbs="GET" users="*"/>

<deny verbs="POST" users="Moderator"/>

<deny verbs="POST" users="*"/>

</authorization>

Answer: C


QUESTION 120

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

Answer: B

 

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