Which code segment should you use?
You need to ensure that the content of each div element can be refreshed individually, without requiring a pag
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?
Which FormView property should you set in the code-behind file?
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?
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 code segment should you use?
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?
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 interface should you add the extension method to?
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?
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.)