Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > question about Page_ClientValidate() function

Reply
Thread Tools

question about Page_ClientValidate() function

 
 
Bob
Guest
Posts: n/a
 
      11-17-2007
Hi,

i know what the javascript function Page_ClientValidate() function does:
tests if all controls meet asp.net validation criteria. This function is
provided by asp.net.
But how can a browser (and escpecially firefox, netscape ..) understand that
function, because it's not pre-programmed in the browser like the base
javascript code.

Thanks
Bob


 
Reply With Quote
 
 
 
 
Teemu Keiski
Guest
Posts: n/a
 
      11-17-2007
All what the function does is defined in ASP.NET's client-side validsation
library which is loaded to the browser by ASP.NET when a page needing
validation controls is requested.

Starting in ASP.NEt 2.0 these functions (there are quite a alot of them)
have been written in cross-browser compatible way so they work in all modern
browsers.

For example Page_ClientValidate

function Page_ClientValidate(validationGroup) {
Page_InvalidControlToBeFocused = null;
if (typeof(Page_Validators) == "undefined") {
return true;
}
var i;
for (i = 0; i < Page_Validators.length; i++) {
ValidatorValidate(Page_Validators[i], validationGroup, null);
}
ValidatorUpdateIsValid();
ValidationSummaryOnSubmit(validationGroup);
Page_BlockSubmit = !Page_IsValid;
return Page_IsValid;
}


--
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net


"Bob" <(E-Mail Removed)> wrote in message
news:%23UgjQ%(E-Mail Removed)...
> Hi,
>
> i know what the javascript function Page_ClientValidate() function does:
> tests if all controls meet asp.net validation criteria. This function is
> provided by asp.net.
> But how can a browser (and escpecially firefox, netscape ..) understand
> that function, because it's not pre-programmed in the browser like the
> base javascript code.
>
> Thanks
> Bob
>



 
Reply With Quote
 
 
 
 
Teemu Keiski
Guest
Posts: n/a
 
      11-17-2007
E.g down to the bottom these functions are just javascript accessing DOM
etc. E.g that base javascript.


--
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net


"Teemu Keiski" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> All what the function does is defined in ASP.NET's client-side validsation
> library which is loaded to the browser by ASP.NET when a page needing
> validation controls is requested.
>
> Starting in ASP.NEt 2.0 these functions (there are quite a alot of them)
> have been written in cross-browser compatible way so they work in all
> modern browsers.
>
> For example Page_ClientValidate
>
> function Page_ClientValidate(validationGroup) {
> Page_InvalidControlToBeFocused = null;
> if (typeof(Page_Validators) == "undefined") {
> return true;
> }
> var i;
> for (i = 0; i < Page_Validators.length; i++) {
> ValidatorValidate(Page_Validators[i], validationGroup, null);
> }
> ValidatorUpdateIsValid();
> ValidationSummaryOnSubmit(validationGroup);
> Page_BlockSubmit = !Page_IsValid;
> return Page_IsValid;
> }
>
>
> --
> Teemu Keiski
> AspInsider, ASP.NET MVP
> http://blogs.aspadvice.com/joteke
> http://teemukeiski.net
>
>
> "Bob" <(E-Mail Removed)> wrote in message
> news:%23UgjQ%(E-Mail Removed)...
>> Hi,
>>
>> i know what the javascript function Page_ClientValidate() function does:
>> tests if all controls meet asp.net validation criteria. This function is
>> provided by asp.net.
>> But how can a browser (and escpecially firefox, netscape ..) understand
>> that function, because it's not pre-programmed in the browser like the
>> base javascript code.
>>
>> Thanks
>> Bob
>>

>
>



 
Reply With Quote
 
Bob
Guest
Posts: n/a
 
      11-17-2007
Thanks, but i still don't know how a browser can interpret those new
functions. The browser (IE, Netscape ..) on my desktop doens't know those
new functions, right? So they must be passed from aspnet (server) to the
browser by a way or another in order to be integrated into the browser.
You see what i don't understand?
Thanks

"Teemu Keiski" <(E-Mail Removed)> schreef in bericht
news:%(E-Mail Removed)...
> E.g down to the bottom these functions are just javascript accessing DOM
> etc. E.g that base javascript.
>
>
> --
> Teemu Keiski
> AspInsider, ASP.NET MVP
> http://blogs.aspadvice.com/joteke
> http://teemukeiski.net
>
>
> "Teemu Keiski" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> All what the function does is defined in ASP.NET's client-side
>> validsation library which is loaded to the browser by ASP.NET when a page
>> needing validation controls is requested.
>>
>> Starting in ASP.NEt 2.0 these functions (there are quite a alot of them)
>> have been written in cross-browser compatible way so they work in all
>> modern browsers.
>>
>> For example Page_ClientValidate
>>
>> function Page_ClientValidate(validationGroup) {
>> Page_InvalidControlToBeFocused = null;
>> if (typeof(Page_Validators) == "undefined") {
>> return true;
>> }
>> var i;
>> for (i = 0; i < Page_Validators.length; i++) {
>> ValidatorValidate(Page_Validators[i], validationGroup, null);
>> }
>> ValidatorUpdateIsValid();
>> ValidationSummaryOnSubmit(validationGroup);
>> Page_BlockSubmit = !Page_IsValid;
>> return Page_IsValid;
>> }
>>
>>
>> --
>> Teemu Keiski
>> AspInsider, ASP.NET MVP
>> http://blogs.aspadvice.com/joteke
>> http://teemukeiski.net
>>
>>
>> "Bob" <(E-Mail Removed)> wrote in message
>> news:%23UgjQ%(E-Mail Removed)...
>>> Hi,
>>>
>>> i know what the javascript function Page_ClientValidate() function does:
>>> tests if all controls meet asp.net validation criteria. This function is
>>> provided by asp.net.
>>> But how can a browser (and escpecially firefox, netscape ..) understand
>>> that function, because it's not pre-programmed in the browser like the
>>> base javascript code.
>>>
>>> Thanks
>>> Bob
>>>

>>
>>

>
>



 
Reply With Quote
 
=?Utf-8?B?TWlsb3N6IFNrYWxlY2tpIFtNQ0FEXQ==?=
Guest
Posts: n/a
 
      11-17-2007
Howdy,

They are downloaded by browser through WebResource.axd http handler. View
HTML source of the page and you'll see something like <script
type="text/javascript" src="WebResource.axd?54£%£$%5whatever". in order to
see content of these files simply select File->Save As to a new directory (
you'll find all the files there, including javascripts as well).

Regards
--
Milosz


"Bob" wrote:

> Thanks, but i still don't know how a browser can interpret those new
> functions. The browser (IE, Netscape ..) on my desktop doens't know those
> new functions, right? So they must be passed from aspnet (server) to the
> browser by a way or another in order to be integrated into the browser.
> You see what i don't understand?
> Thanks
>
> "Teemu Keiski" <(E-Mail Removed)> schreef in bericht
> news:%(E-Mail Removed)...
> > E.g down to the bottom these functions are just javascript accessing DOM
> > etc. E.g that base javascript.
> >
> >
> > --
> > Teemu Keiski
> > AspInsider, ASP.NET MVP
> > http://blogs.aspadvice.com/joteke
> > http://teemukeiski.net
> >
> >
> > "Teemu Keiski" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> >> All what the function does is defined in ASP.NET's client-side
> >> validsation library which is loaded to the browser by ASP.NET when a page
> >> needing validation controls is requested.
> >>
> >> Starting in ASP.NEt 2.0 these functions (there are quite a alot of them)
> >> have been written in cross-browser compatible way so they work in all
> >> modern browsers.
> >>
> >> For example Page_ClientValidate
> >>
> >> function Page_ClientValidate(validationGroup) {
> >> Page_InvalidControlToBeFocused = null;
> >> if (typeof(Page_Validators) == "undefined") {
> >> return true;
> >> }
> >> var i;
> >> for (i = 0; i < Page_Validators.length; i++) {
> >> ValidatorValidate(Page_Validators[i], validationGroup, null);
> >> }
> >> ValidatorUpdateIsValid();
> >> ValidationSummaryOnSubmit(validationGroup);
> >> Page_BlockSubmit = !Page_IsValid;
> >> return Page_IsValid;
> >> }
> >>
> >>
> >> --
> >> Teemu Keiski
> >> AspInsider, ASP.NET MVP
> >> http://blogs.aspadvice.com/joteke
> >> http://teemukeiski.net
> >>
> >>
> >> "Bob" <(E-Mail Removed)> wrote in message
> >> news:%23UgjQ%(E-Mail Removed)...
> >>> Hi,
> >>>
> >>> i know what the javascript function Page_ClientValidate() function does:
> >>> tests if all controls meet asp.net validation criteria. This function is
> >>> provided by asp.net.
> >>> But how can a browser (and escpecially firefox, netscape ..) understand
> >>> that function, because it's not pre-programmed in the browser like the
> >>> base javascript code.
> >>>
> >>> Thanks
> >>> Bob
> >>>
> >>
> >>

> >
> >

>
>
>

 
Reply With Quote
 
Teemu Keiski
Guest
Posts: n/a
 
      11-17-2007
Milosz gave you the answer that they are resources in System.Web assembly,
loaded with WebResource handler. You can also inspect all those resources by
getting Reflector, and viewing resources in System.Web assembly (especially
WebUIValidation.js)

http://www.aisto.com/roeder/dotnet/


--
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net

"Bob" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Thanks, but i still don't know how a browser can interpret those new
> functions. The browser (IE, Netscape ..) on my desktop doens't know those
> new functions, right? So they must be passed from aspnet (server) to the
> browser by a way or another in order to be integrated into the browser.
> You see what i don't understand?
> Thanks
>
> "Teemu Keiski" <(E-Mail Removed)> schreef in bericht
> news:%(E-Mail Removed)...
>> E.g down to the bottom these functions are just javascript accessing DOM
>> etc. E.g that base javascript.
>>
>>
>> --
>> Teemu Keiski
>> AspInsider, ASP.NET MVP
>> http://blogs.aspadvice.com/joteke
>> http://teemukeiski.net
>>
>>
>> "Teemu Keiski" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> All what the function does is defined in ASP.NET's client-side
>>> validsation library which is loaded to the browser by ASP.NET when a
>>> page needing validation controls is requested.
>>>
>>> Starting in ASP.NEt 2.0 these functions (there are quite a alot of them)
>>> have been written in cross-browser compatible way so they work in all
>>> modern browsers.
>>>
>>> For example Page_ClientValidate
>>>
>>> function Page_ClientValidate(validationGroup) {
>>> Page_InvalidControlToBeFocused = null;
>>> if (typeof(Page_Validators) == "undefined") {
>>> return true;
>>> }
>>> var i;
>>> for (i = 0; i < Page_Validators.length; i++) {
>>> ValidatorValidate(Page_Validators[i], validationGroup, null);
>>> }
>>> ValidatorUpdateIsValid();
>>> ValidationSummaryOnSubmit(validationGroup);
>>> Page_BlockSubmit = !Page_IsValid;
>>> return Page_IsValid;
>>> }
>>>
>>>
>>> --
>>> Teemu Keiski
>>> AspInsider, ASP.NET MVP
>>> http://blogs.aspadvice.com/joteke
>>> http://teemukeiski.net
>>>
>>>
>>> "Bob" <(E-Mail Removed)> wrote in message
>>> news:%23UgjQ%(E-Mail Removed)...
>>>> Hi,
>>>>
>>>> i know what the javascript function Page_ClientValidate() function
>>>> does: tests if all controls meet asp.net validation criteria. This
>>>> function is provided by asp.net.
>>>> But how can a browser (and escpecially firefox, netscape ..) understand
>>>> that function, because it's not pre-programmed in the browser like the
>>>> base javascript code.
>>>>
>>>> Thanks
>>>> Bob
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
Bob
Guest
Posts: n/a
 
      11-17-2007
Thanks to both

"Teemu Keiski" <(E-Mail Removed)> schreef in bericht
news:%(E-Mail Removed)...
> Milosz gave you the answer that they are resources in System.Web assembly,
> loaded with WebResource handler. You can also inspect all those resources
> by getting Reflector, and viewing resources in System.Web assembly
> (especially WebUIValidation.js)
>
> http://www.aisto.com/roeder/dotnet/
>
>
> --
> Teemu Keiski
> AspInsider, ASP.NET MVP
> http://blogs.aspadvice.com/joteke
> http://teemukeiski.net
>
> "Bob" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Thanks, but i still don't know how a browser can interpret those new
>> functions. The browser (IE, Netscape ..) on my desktop doens't know those
>> new functions, right? So they must be passed from aspnet (server) to the
>> browser by a way or another in order to be integrated into the browser.
>> You see what i don't understand?
>> Thanks
>>
>> "Teemu Keiski" <(E-Mail Removed)> schreef in bericht
>> news:%(E-Mail Removed)...
>>> E.g down to the bottom these functions are just javascript accessing DOM
>>> etc. E.g that base javascript.
>>>
>>>
>>> --
>>> Teemu Keiski
>>> AspInsider, ASP.NET MVP
>>> http://blogs.aspadvice.com/joteke
>>> http://teemukeiski.net
>>>
>>>
>>> "Teemu Keiski" <(E-Mail Removed)> wrote in message
>>> news:(E-Mail Removed)...
>>>> All what the function does is defined in ASP.NET's client-side
>>>> validsation library which is loaded to the browser by ASP.NET when a
>>>> page needing validation controls is requested.
>>>>
>>>> Starting in ASP.NEt 2.0 these functions (there are quite a alot of
>>>> them) have been written in cross-browser compatible way so they work in
>>>> all modern browsers.
>>>>
>>>> For example Page_ClientValidate
>>>>
>>>> function Page_ClientValidate(validationGroup) {
>>>> Page_InvalidControlToBeFocused = null;
>>>> if (typeof(Page_Validators) == "undefined") {
>>>> return true;
>>>> }
>>>> var i;
>>>> for (i = 0; i < Page_Validators.length; i++) {
>>>> ValidatorValidate(Page_Validators[i], validationGroup, null);
>>>> }
>>>> ValidatorUpdateIsValid();
>>>> ValidationSummaryOnSubmit(validationGroup);
>>>> Page_BlockSubmit = !Page_IsValid;
>>>> return Page_IsValid;
>>>> }
>>>>
>>>>
>>>> --
>>>> Teemu Keiski
>>>> AspInsider, ASP.NET MVP
>>>> http://blogs.aspadvice.com/joteke
>>>> http://teemukeiski.net
>>>>
>>>>
>>>> "Bob" <(E-Mail Removed)> wrote in message
>>>> news:%23UgjQ%(E-Mail Removed)...
>>>>> Hi,
>>>>>
>>>>> i know what the javascript function Page_ClientValidate() function
>>>>> does: tests if all controls meet asp.net validation criteria. This
>>>>> function is provided by asp.net.
>>>>> But how can a browser (and escpecially firefox, netscape ..)
>>>>> understand that function, because it's not pre-programmed in the
>>>>> browser like the base javascript code.
>>>>>
>>>>> Thanks
>>>>> Bob
>>>>>
>>>>
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Function versus pointer to function, in context of std::function,huh? Alf P. Steinbach C++ 10 07-27-2011 05:51 AM
Function pointer to void function and int function Giannis Papadopoulos C Programming 5 09-05-2005 09:06 PM
How override ALL function calls? (Is there a "function call function"?) seberino@spawar.navy.mil Python 2 08-01-2005 12:38 PM
write a function such that when ever i call this function in some other function .it should give me tha data type and value of calling function parameter komal C++ 6 01-25-2005 11:13 AM
Passing a C++ object's member function to a C function expecing a function pointer! James Vanns C++ 7 01-21-2004 02:39 AM



Advertisments