Over the past few weeks I’ve been working to migrate away from the Ajax Control Toolkit & various other ASP. My goal has been to get every page of our intranet portal down around 100K, with a maximum load time of ) this was a bit more difficult to implement.
As noted, the default setup of the validation plug in is to validate a FORM which isn’t possible with ASP. To get around this, I decided I was going to wrap all my forms in a FIELDSET with the class “validation Group”.
Here is my custom validation function: Next, I need to trigger the validation for the current FIELDSET I’m working in based on on some action… Since the default setting is to validation on submit, you need to disable this and register your Validate And Submit function call when your event is triggered.
That’s it, with those three little little steps (Custom Validate Method, Disable Default/Auto Bind, Manual bind button to custom event), you now have a working validate by FIELDSET (or any other grouping control) solution. NET will render a Check Box or a Check Box List with an auto generated unique name attribute.
In this chapter, you learn how to validate form fields when a form is submitted to the web server.
You can use the validation controls to prevent users from submitting the wrong type of data into a database table.
Using this class as my selection, I’m able to have multiple groups of controls wrapped in a FIELDSET validated separately.
for general information on the validation Web controls and Dissecting Validation Controls in ASP.In the first part of this chapter, you are provided with an overview of the standard validation controls included in the ASP. You learn how to control how validation errors are displayed, how to highlight validation error messages, and how to use validation groups.You are provided with sample code for using each of the standard validation controls.My solution to the problem required a custom validator and a custom error Placement function, for the j Query validaiton plug-in.First, I added a custom validator that looked at a group of check boxes that are inside a wrapping “Parent()” element.