PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

You need to create and use a separate style for the Help button, and you must use the default style for the De

You are implementing an ASP.NET page. You add asp:Button controls for Help and for Detail. You
add an ASP.NET skin file named default.skin to a theme. You need to create and use a separate style
for the Help button, and you must use the default style for the Detail button. What should you do?

You need to implement the error handling code for SearchMessages and create a new channel on the client only i

A Windows Communication Foundation (WCF) service implements the following contract.
(Line numbers are included for reference only.) 01 [ServiceContract] 02 public interface
IDataAccessService 03 { 01 [OperationContract] 05 void PutMessage(string message); 06
07 [OperationContract] 08 [FaultContract(typeof(TimeoutFaultException)) ] 09
[FaultContract(typeof(FaultException) ) ] 10 stringf] SearchMessages(string search); 11 }
The implementation of the SearchMessages method throws TimeoutFaultException
exceptions for database timeouts. The implementation of the SearchMessages method also
throws an Exception for any other issue it encounters while processing the request. These
exceptions are received on the client side as generic FaultException exceptions. You need
to implement the error handling code for SearchMessages and create a new channel on the
client only if the channel faults. What should you do?

Which event handler should you add?

You are implementing an ASP.NET page in an e-commerce application. Code in a btnAddToCart_Click
event handler adds a product to the shopping cart. The page should check the status of the shopping
cart and always show a cart icon when one or more items are in the shopping cart. The page should
hide the icon when the shopping cart has no items. You need to add an event handler to implement
this requirement. Which event handler should you add?

You need to ensure that the form cannot be used to submit invalid credit card numbers to the server

You are developing a Web page. The user types a credit card number into an input control named cc
and clicks a button named submit. The submit button sends the credit card number to the server. A
JavaScript library includes a CheckCreditCard function that returns a value of true if the credit card
appears to be valid, based on its checksum. You need to ensure that the form cannot be used to
submit invalid credit card numbers to the server. What should you do?

You need to retrieve the debug version of the service JavaScript

An ASP NET application hosts a RESTful Windows Communication Foundation (WCF)
service at /ServiceslContoso.svc. The service provides a JavaScript resource to clients. You
have an explicit reference to the JavaScript in your page markup as follows. <script type =
text/javaScript’ srcsIServices/Contoso. svc/js” /> You need to retrieve the debug version of
the service JavaScript. What should you do?