Validation Guidance | AJAX Validation QuickStart documentation | Patterns related to validation

ServerSideValidationExtender Control

Developers often have to perform validations that cannot be entirely completed on the client because they require resources in the server, such as a list of valid values against which to validate the input. In those cases, ASP.NET developers typically use validation controls that perform custom server-side validations (that is, CustomValidator controls). This kind of validation controls requires full postbacks to do the validation.
This Validation Bundle includes an extender control named ServerSideValidationExtender. By using this control, ASP.NET developers can invoke existing server-side validators through an asynchronous callback, without performing a full postback to the server.
By using the ServerSideValidationExtender control, UI responsiveness is improved and the application code is simplified because the extender encapsulates the logic to asynchronously interact with the server. Thus, developers can focus entirely on the validation logic and do not have to deal with low-level communication implementation details.
The ServerSideValidationExtender control can extend the PropertyProxyValidator control provided by the Validation Application Block. By combining the ServerSideValidationExtender and the Validation Application Block, you can encapsulate validation best practices into easily maintainable code that you can reuse. By using encapsulation, you can separate the application code from the validation logic. A common situation where the Validation Application Block works well is when your validation code must work across multiple layers of the application's architecture.
For more information about the Validation Application Block, see Introduction to the Validation Application Block in the Enterprise Library documentation.

Requirements

To use the ServerSideValidationExtender control, you must have the following:

Using the Control

To use the control
  1. In your Web site, add references to the AjaxControlToolkit.WCSFExtensions.dll assembly and the AjaxControlToolkit.dll assembly.
  2. Add the ServerSideValidationExtender control to the Toolbox (this step is necessary only if you do not see the ServerSideValidationExtender control in the Toolbox). To add the ServerSideValidationExtender control to the Toolbox, right-click the Validation tab in the Toolbox, and then click Choose Items. On the .NET Framework Components tab, click Browse, select the AjaxControlToolkit.WCSFExtensions.dll assembly, and then click Open. In the list of components, select the ServerSideValidationControl control, and then click OK.
  3. Drag a ServerSideValidationExtender control to the Web page and set the TargetControlID property to the ID of the validator for which you want to add AJAX capabilities.
Validation Guidance | AJAX Validation QuickStart documentation | Patterns related to validation

Last edited Nov 8, 2007 at 12:55 PM by siacomuzzi, version 2

Comments

alexander123 Jun 15, 2009 at 6:27 PM 
found the solution here http://websf.codeplex.com/WorkItem/View.aspx?WorkItemId=14864

alexander123 Jun 15, 2009 at 6:17 PM 
I can't get it to work inside UpdatePanel. When UpdatePanel loaded first time it works OK. But after the reload - it does not. I found that similar issues where with standard validators but now they are fixed. I've tried to use RequiredFieldValidator to check if it works in this scenario and yes, it works. So can you please verify it?