Which code segment should you use?
Which two actions should you perform?
You are implementing an ASP.NET page that hosts a user control named CachedControl. You need to
ensure that the content of the user control is cached for 10 seconds and that it is regenerated when
fetched after the 10 seconds elapse. Which two actions should you perform? (Each correct answer
presents part of the solution. Choose two.)
You need to ensure that the ServiceHost instance supports multiple discovery versions
You are developing a Windows Communication Foundation (WCF) service that must be
discoverable. You need to ensure that the ServiceHost instance supports multiple discovery
versions. What should you do?
You need to ensure that the menu items are populated from an array of strings in your code-behind file
You create a Web page that has an ASP.NET menu. You need to ensure that the menu items are
populated from an array of strings in your code-behind file. What should you do?
You need to display the user input in the Web page so that a cross-site scripting attack will be prevented
You are implementing a Web page that displays text that was typed by a user. You need to display
the user input in the Web page so that a cross-site scripting attack will be prevented. What should
you do?
You need to ensure that the transaction is aborted if the Update method is not successful
You are developing a Windows Communication Foundation (WCF) service that allows
customers to update financial data. The client applications call the service in a transaction.
The service contract is defined as follows. (Line numbers are included for reference only.)
Customers report that the transaction completes successfully even if the Update method
throws an exception. You need to ensure that the transaction is aborted if the Update
method is not successful. What should you do?
Which code segment should you use?
You create a Web page that contains the following code.
You need to provide the following implementation. Each time the AddFile button is clicked, a new
div element is created. The new div element is appended after the other file upload div elements
and before the AddFile span. Each new element has a unique identifier. Which code segment should
you use?
Which declaration should you use?
Which attribute should you use to decorate the service?
You are developing a Windows Communication Foundation (WCF) service that does not
operate on a duplex channel. You find that operations do not start until all previous
operations have finished. The service hosting code contains the following lines. var service
= new WarehouseService(); var host = new ServiceHost(service); You need to ensure that
new operations do not wait for previous operations to finish. Which attribute should you use
to decorate the service?
Which two actions should you perform?
You are implementing an ASP.NET AJAX page. You add the following control to the page.
<asp:UpdatePanel ID=”pnl1″ runat=”server” UpdateMode=”Conditional”>
<ContentTemplate> … </ContentTemplate>
</asp:UpdatePanel>
You need update the contents of the UpdatePanel without causing a full reload of the page. Which
two actions should you perform? (Each correct answer presents part of the solution. Choose two.)