Ask a Question related to ASP.NET General, Design and Development.
-
Colin Mackay #1
Re: only custom validation control does server side validation?
On a CustomValidator you have to provide the validation code because
otherwise it doesn't know what to do for the validation.
Other validator controls use client and server side validation (for graceful
degrading if the client doesn't support it). If you put another type of
validator on an ASPX page then run in, you will find a line in generated
source for your web page that looks like:
<script language="javascript"
src="/aspnet_client/system_web/1_1_4322/WebUIValidation.js"></script>
This is the .NET client side validation.
If you are creating a custom validator, you have to provide at least the
server side validation (should the client not support scripts, or if the
client has denied scripts the right to run), and optionally also the Client
side validation. To tell .NET about your client side validation function you
have to set EnableClientScript=true; and ClientValidatorFunction=<the string
name of your function>
Actually the ClientValidatorFunction string should be the name of your
client side function without the parentheses, ASP.NET will add them and
supply the values for the two parameters.
I hope this helps,
Colin.
"Andy Nagai" <aanagai@earthlink.net> wrote in message
news:X1RJa.10040$C83.990828@newsread1.prod.itd.ear thlink.net...> Hi
>
> Ive noticed that only the customized validation control has the
> ServerValidate event handler. Does this mean that only using that control
> you can do server side validation?
>
> I mean you got to put some code on the server that responds to somekind of
> event to do something.
>
>
Colin Mackay Guest
-
CFFORM Validation trumping Custom Form Validation
Is there any way for custom form validation to work in concert with the cfform validation? I have a custom script that compares the values of two... -
Server-Side Validation
Hello, Does anyone have a quick and dirty script for implementing server-sider form validation (checking for illegal characters)? I already have... -
Custom Server Control Property Validation Issue
I've been developing a custom server control that composites a Calendar control and several other controls. In this class, I have two properties... -
Custom Client-Side Validation in Web User Control
Guys, I have a custom validator that has the default property ControlToValidate plus one called SecondControlToValidate that I have created, like... -
validation summary doesnt display when there's client-side validation
I have a custom validator that validates a numeric field, txtField, that allows for thousand separators. I also placed a validation summary so...



Reply With Quote

