PrepAway - Latest Free Exam Questions & Answers

Tag: Exam 70-515 (update October 26th, 2015)

Exam 70-515: TS: Web Applications Development with Microsoft .NET Framework 4 (update October 26th, 2015)

You need to ensure that the GetCurrentRate method can be called from JavaScript

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?

Which method of the FieldTemplateUserControl class should you override in the BooleanField class?

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?

Which code segment should you use?

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?

You need to configure the ObjectDataSource control to pass the value of the pid field to GetProductsByProductI

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?

Which two actions should you perform?

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


Page 5 of 26« First...34567...1020...Last »