PrepAway - Latest Free Exam Questions & Answers

Which two actions should you recommend?

You are designing an ASP.NET Web application that allows users to type a value in a text box.
The application must function with JavaScript disabled.
You need to design a method for using a Web serviceto validate the user-typed value before the form is
processed.
Which two actions should you recommend?
(Each correct answer presents part of the solution.Choose two.)

PrepAway - Latest Free Exam Questions & Answers

A.
Use a CustomValidator control.

B.
Use a DynamicValidator control.

C.
Use an OnServerValidate method.
D. Use a ClientValidationFunction method.

Explanation:
CustomValidator.OnServerValidate
The ServerValidate event is raised when validation is performed on the server.
Raising an event invokes the event handler through a delegate. For more information, see Events and
Delegates.
The OnServerValidate method also allows derived classes to handle the event without attaching a delegate.
This is the preferred technique for handling the event in a derived class.
Notes to Inheritors
When overriding OnServerValidate in a derived class, be sure to call the base class’s OnServerValidate
method so that registered delegates receive the event.
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.customvalidator.onservervalidate.aspx


Leave a Reply