Still Trying to Understand Validation

J

Jonathan Wood

Looking at the page loaded into the browser, I found the following inside of
<form></form>:

<input type="image" name="ContinueButton" onclick="if
(typeof(Page_ClientValidate) == 'function') Page_ClientValidate(); "
language="javascript" id="ContinueButton"
src="http://localhost/[...]\Continue.gif" border="0" />

Doesn't this suggest that Page_ClientValidate() should be a routine on the
page somewhere? I searched for "Page_ClientValidate" and only found it above
and for one other control that looked much like this one.

Can anyone help me understand these lines?

Thanks.
 
G

Guest

Doesn't this suggest that Page_ClientValidate() should be a routine on the page somewhere

Yes. But the function could also be embedded with in a .js file. In this case Page_ClientValidate should be in the following location on your computer(version may be different) C:\Inetpub\wwwroot\aspnet_client\system_web\1_0_3705_0\WebUIValidation.js. It could also be under C:\Inetpub\wwwroot\<YOURPROJECT>\aspnet_client\system_web\1_0_3705_0\WebUIValidation.js. If you can't find it there then search for it

The function gets wired to handle the onclick event of a control by .NET if validation is happening

HTH
Suresh

----- Jonathan Wood wrote: ----

Looking at the page loaded into the browser, I found the following inside o
<form></form>

<input type="image" name="ContinueButton" onclick="i
(typeof(Page_ClientValidate) == 'function') Page_ClientValidate();
language="javascript" id="ContinueButton
src="http://localhost/[...]\Continue.gif" border="0" /

Doesn't this suggest that Page_ClientValidate() should be a routine on th
page somewhere? I searched for "Page_ClientValidate" and only found it abov
and for one other control that looked much like this one

Can anyone help me understand these lines

Thanks
 
J

Jonathan Wood

Okay, found it. Thanks.

Can you tell me what happens in the case of a CustomValidator control? It
would seem that would need to work on the server side because it has a
custom event that must be processed. Is that right?

--
Jonathan Wood
SoftCircuits
http://www.softcircuits.com
Available for consulting: http://www.softcircuits.com/jwood/resume.htm

Suresh said:
the page somewhere?

Yes. But the function could also be embedded with in a .js file. In this
case Page_ClientValidate should be in the following location on your
computer(version may be different)
C:\Inetpub\wwwroot\aspnet_client\system_web\1_0_3705_0\WebUIValidation.js.
It could also be under
C:\Inetpub\wwwroot\ said:
The function gets wired to handle the onclick event of a control by .NET if validation is happening.

HTH,
Suresh.

----- Jonathan Wood wrote: -----

Looking at the page loaded into the browser, I found the following inside of
<form></form>:

<input type="image" name="ContinueButton" onclick="if
(typeof(Page_ClientValidate) == 'function') Page_ClientValidate(); "
language="javascript" id="ContinueButton"
src="http://localhost/[...]\Continue.gif" border="0" />

Doesn't this suggest that Page_ClientValidate() should be a routine on the
page somewhere? I searched for "Page_ClientValidate" and only found it above
and for one other control that looked much like this one.

Can anyone help me understand these lines?

Thanks.
 
S

Scott Allen

A CustomValidator object can do client side validation too. Set the
property ClientValidationFunction with the name of the custom
client-side script function, and send a <script> block to the client
with the function in jscript or vbscript.
 
J

Jonathan Wood

Makes sense (what little I understood of it anyway). I'll look into this.

Thanks.
 
J

Jonathan Wood

Thanks. Looks like the sample given only uses server-side validation but
I'll look into it further.

--
Jonathan Wood
SoftCircuits
http://www.softcircuits.com
Available for consulting: http://www.softcircuits.com/jwood/resume.htm

Suresh said:
Yes. Like Scott said customvalidator can do client side validation as well.

Click on the link below for a sample and explanation.
http://samples.gotdotnet.com/quickstart/aspplus/doc/webvalidation.aspx#custom

Suresh.

----- Jonathan Wood wrote: -----

Okay, found it. Thanks.

Can you tell me what happens in the case of a CustomValidator control? It
would seem that would need to work on the server side because it has a
custom event that must be processed. Is that right?

--
Jonathan Wood
SoftCircuits
http://www.softcircuits.com
Available for consulting: http://www.softcircuits.com/jwood/resume.htm on
the page somewhere? In this
case Page_ClientValidate should be in the following location on your
computer(version may be different)
C:\Inetpub\wwwroot\aspnet_client\system_web\1_0_3705_0\WebUIValidation.js.
It could also be under
C:\Inetpub\wwwroot\ said:
lidation.js. If you can't find it there then search for it. by .NET
if validation is happening. following
inside of
<input type="image" name="ContinueButton" onclick="if
(typeof(Page_ClientValidate) == 'function') Page_ClientValidate(); "
language="javascript" id="ContinueButton"
src="http://localhost/[...]\Continue.gif" border="0" />>>
Doesn't this suggest that Page_ClientValidate() should be a routine
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top