QUESTION 41
You create a Web page that contains drop-down menus that are defined by using div tags in the following code.
You need to write a JavaScript function that will enable the drop-down menus to activate when the user positions the mouse over the menu title.
Which code segment should you use?
A. |
$(“.dropdown-menu”).hover( function () { $(“.menu-items”). slideDown (100); }, function () { $(“.menu-items”). slideUp (100); } ); |
B. |
$(“.dropdown-menu”).hover( function () { $(“.menu-items”, this). slideDown (100); }, function () { $(“.menu-items”, this). slideUp (100); } ); |
C. |
$(“.dropdown-menu”).hover( function () { $(this). slideDown (100);. }, function () { $(this). slideUp (100); } ); |
D. |
$(“.dropdown-menu”).hover( function () { $(this, “.menu-title”). slideDown (100); }, function () { $(this, “.menu-title”). slideUp (100); } ); |
Correct Answer: B
Explanation:
hover() function
(http://api.jquery.com/hover/)
QUESTION 42
You are implementing an ASP.NET AJAX page that contains two div elements. You need to ensure that the content of each div element can be refreshed individually, without
requiring a page refresh. What should you do?
A. |
Add two forms to the page. Add a script manager and an update panel to each form. Add a content template to each update panel, and move each div element into a content template. |
B. |
Add two forms to the page. Add a script manager and an update panel to each form. Add a content template to each update panel, and move each div element into a content template. |
C. |
Add a form and two update panels to the page. Add a script manager to the form. Add a content template to each update panel, and move a div element into each content template. |
D. |
Add a form and two update panels to the page. Add two script managers to the form, one for each update panel. Add a content template to each update panel, and move each div element into a content template. |
Correct Answer: C
QUESTION 43
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 |
Correct Answer: A
QUESTION 44
You are implementing a WCF service library. You add a new code file that contains the following code segment.
Namespace ContosoWCF
<ServiceContract()>
Public Interface IRateService
<OperationContract()>
Function GetCurrentRate() As Decimal
End Interface
Partial Public Class RateService
Implements IRateService
Public Function GetCurrentRate() As Decimal _
Implements IRateService.GetCurrentRate
Dim currentRate As Decimal =
GetRateFromDatabase()
Return currentRate
End Function
End Class
End Namespace
You build the service library and deploy its assembly to an IIS application.
You need to ensure that the GetCurrentRate method can be called from JavaScript.
What should you do?
A. |
Add a file named Service.svc to the IIS application. Add the following code segment to the file. <%@ ServiceHost Service=”ContosoWCF.IRateService” Factory=”System.ServiceModel.Activation.WebScriptServiceHostFactory” %> |
B. |
Add a file named Service.svc to the IIS application. Add the following code segment to the file. <%@ ServiceHost Service=”ContosoWCF.RateService” Factory=”System.ServiceModel.Activation.WebScriptServiceHostFactory” %> |
C. |
Apply the ScriptService attribute to the RateService class. Rebuild the WCF service library, and redeploy the assembly to the IIS application. |
D. |
Apply the WebGet attribute to the GetCurrentRate interface method. Rebuild the WCF service library, and redeploy the assembly to the IIS application. |
Correct Answer: B
QUESTION 45
You are implementing an ASP.NET page. The page includes a method named GetCustomerOrderDataSet that returns a DataSet. The DataSet includes a DataTable named CustomerDetailsTable and a DataTable named OrderDetailsTable. You need to display the data in OrderDetailsTable in a DetailsView control named dtlView. Which code segment should you use?
A. |
dtlView.DataSource = GetCustomerOrderDataSet() dtlView.DataMember = “OrderDetailsTable” dtlView.DataBind() |
B. |
dtlView.DataSource = GetCustomerOrderDataSet() dtlView.DataSourceID = “OrderDetailsTable” dtlView.DataBind() |
C. |
dtlView.DataSource = GetCustomerOrderDataSet() dtlView.DataKeyNames = New String() {“OrderDetailsTable”} dtlView.DataBind() |
D. |
Dim dataSet As DataSet = GetCustomerOrderDataSet() dtlView.DataSource = New DataTable(“dataSet”, “OrderDetailsTable”) dtlView.DataBind() |
Correct Answer: A
QUESTION 46
You are developing an ASP.NET Dynamic Data Web application.
Boolean fields must display as Yes or No instead of as a check box. You replace the markup in the default Boolean field template with the following markup.
<asp:Label runat=”server” ID=”label” />
You need to implement the code that displays Yes or No.
Which method of the FieldTemplateUserControl class should you override in the BooleanField class?
A. |
OnLoad |
B. |
Construct |
C. |
OnDataBinding |
D. |
SaveControlState |
Correct Answer: C
QUESTION 47
You are developing an ASP.NET Web page that will display the median value from a sequence of integer values. You need to create an extension method to compute the median value. Which interface should you add the extension method to?
A. |
IComparer(Of T) |
B. |
IEnumerable(Of T) |
C. |
IEnumerator(Of T) |
D. |
IEqualityComparer(Of T) |
Correct Answer: B
QUESTION 48
You are implementing an ASP.NET page. Client-side script requires data.
Your application includes a class named Person with a Name property of type string.
The code-behind file of the page includes the following code segment.
Public JsonValue As String
Dim people As List(Of Person) = GetPeopleList()
Dim json As JavaScriptSerializer = New JavaScriptSerializer()
You need to use the JavaScriptSerializer class to serialize only the value of the Name property of each item in the people list.
Which code segment should you use?
A. |
JsonValue = json.Serialize(people.Select(Function(p) p.Name)) |
B. |
Dim names = From person In people Select person JsonValue = “{” & json.Serialize(names) & “}” |
C. |
JsonValue = json.Serialize(people.SelectMany( Function(p) p.Name.AsEnumerable())) |
D. |
Dim names = From person In people Select person JsonValue = json.Serialize(names) |
Correct Answer: A
QUESTION 49
You are implementing an ASP.NET page. You add and configure the following ObjectDataSource.
<asp:ObjectDataSource SelectMethod=”GetProductByProductId”
ID=”odc” runat=”server” TypeName=”ProductDAL”>
<SelectParameters>
<asp:Parameter Name=”productId” Type=”Int32″ />
</SelectParameters>
</asp:ObjectDataSource>
The page will be called with a query string field named pid.
You need to configure the ObjectDataSource control to pass the value of the pid field to GetProductsByProductId method.
What should you do?
A. |
Replace the asp:Parameter with the following declaration. <asp:QueryStringParameter DefaultValue=”pid” Name=”productId” Type=”Int32″ /> |
B. |
Replace the asp:Parameter with the following declaration. <asp:QueryStringParameter QueryStringField=”pid” Name=”productId” Type=”Int32″ / > |
C. |
Add the following event handler to the Selecting event of the ObjectDataSource control. Private Sub odc_Selecting(ByVal sender As Object, ByVal e As _ System.Web.UI.WebControls.ObjectDataSourceSelectingEventArgs) _ Handles odc.Selecting |
D. |
InputParameters(“pid”) = Request.QueryString(“productId”) End Sub |
E. |
Add the following code segment to the pages code-behind. Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load odc.SelectParameters.Add(“productId”, Request.QueryString(“pid”)) End Sub |
Correct Answer: B
QUESTION 50
You are developing an ASP.NET Web service.
The following code segment implements the service. (Line numbers are included for reference only.)
01 <WebServiceBinding(
ConformsTo:=WsiProfiles.BasicProfile1_1)>
02 Public Class ProductService
03 Inherits System.Web.Services.WebService
04
05 <WebMethod()>
06 Public Function GetProduct(
07 ByVal name As String) As Product
08
09 End Function
10
11 <WebMethod()>
12 Public Function GetProduct(
13 ByVal id As Integer) As Product
14
15 End Function
16
17 End Class
You need to ensure that both GetProduct methods can be called from a Web client.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
A. |
Remove line 01. |
B. |
Add the Shared modifier on lines 06 and 12. |
C. |
Add the following attribute before line 11. <SoapDocumentMethod(Action:=”GetProductById”)> |
D. |
Modify the attribute on line 11 as follows. <WebMethod(MessageName:=”GetProductById”)> |
Correct Answer: AD
Explanation:
WebServiceBindingAttribute Class
(http://msdn.microsoft.com/en-us/library/system.web.services.webservicebindingattribute.aspx)
Instant Access to Download Testing Software & PDF File for Microsoft 70-515 Real Exam
Instant Access to Try Microsoft 70-515 Free Demo
100-105 Dumps VCE PDF
200-105 Dumps VCE PDF
300-101 Dumps VCE PDF
300-115 Dumps VCE PDF
300-135 Dumps VCE PDF
300-320 Dumps VCE PDF
400-101 Dumps VCE PDF
640-911 Dumps VCE PDF
640-916 Dumps VCE PDF
70-410 Dumps VCE PDF
70-411 Dumps VCE PDF
70-412 Dumps VCE PDF
70-413 Dumps VCE PDF
70-414 Dumps VCE PDF
70-417 Dumps VCE PDF
70-461 Dumps VCE PDF
70-462 Dumps VCE PDF
70-463 Dumps VCE PDF
70-464 Dumps VCE PDF
70-465 Dumps VCE PDF
70-480 Dumps VCE PDF
70-483 Dumps VCE PDF
70-486 Dumps VCE PDF
70-487 Dumps VCE PDF
220-901 Dumps VCE PDF
220-902 Dumps VCE PDF
N10-006 Dumps VCE PDF
SY0-401 Dumps VCE PDF