These questions are based on Cert-70-554VB – MSCert: UPGRADE – MCSD Microsoft .NET Skills to MCPD Enterprise Application Developer Using the Microsoft .NET Framework: Part 2 – Section 1 Microsoft Developer Self-Test Software Practice Test.
Objective: Implementing asynchronous calls and remoting events
SubObjective: Call Web methods asynchronously
Item Number: Cert-70-554VB.4.1.1
Single Answer, Multiple Choice
You are an enterprise application developer at AccuTech Corp. You are developing an ASP.NET 2.0 Web application for customers to renew their existing insurance policies. The Web application consumes a Web service named InsuranceSolutionService.
The InsuranceSolutionService Web service is defined as follows:
Public Class InsuranceSolutionService
Public Function RenewPolicy(ByVal number As Integer, _
ByVal amount As Single, ByVal duration As Integer) As Boolean
One of the Web pages, RenewPolicy.aspx, has a button for customers to renew their existing policies. When a user clicks the RenewPolicyButton Web control in the client Web application, the RenewPolicy method should be invoked before displaying the next Web page to the user. You enable the asynchronous operations on the page.
The RenewPolicy method takes a significant amount of time to complete execution. While the RenewPolicy method is executing, the user should be taken to the next page in the Web application. Which code should you use to invoke the RenewPolicy Web method?
- Protected Sub RenewPolicyButton_Click(ByVal sender As Object, ByVal e As EventArgs)
Dim proxy As New InsuranceSolutionService()
proxy.RenewPolicy(policyNumber, amount, 365)
Please log in or subscribe to read this article