question about Page_ClientValidate() function

Discussion in 'ASP .Net' started by Bob, Nov 17, 2007.

  1. Bob

    Bob Guest

    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
    Bob, Nov 17, 2007
    #1
    1. Advertising

  2. Bob

    Teemu Keiski Guest

    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, 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" <> wrote in message
    news:%23UgjQ%...
    > 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
    >
    Teemu Keiski, Nov 17, 2007
    #2
    1. Advertising

  3. Bob

    Teemu Keiski Guest

    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" <> wrote in message
    news:...
    > 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, 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" <> wrote in message
    > news:%23UgjQ%...
    >> 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
    >>

    >
    >
    Teemu Keiski, Nov 17, 2007
    #3
  4. Bob

    Bob Guest

    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" <> schreef in bericht
    news:%...
    > 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" <> wrote in message
    > news:...
    >> 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, 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" <> wrote in message
    >> news:%23UgjQ%...
    >>> 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
    >>>

    >>
    >>

    >
    >
    Bob, Nov 17, 2007
    #4
  5. 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" <> schreef in bericht
    > news:%...
    > > 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" <> wrote in message
    > > news:...
    > >> 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, 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" <> wrote in message
    > >> news:%23UgjQ%...
    > >>> 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
    > >>>
    > >>
    > >>

    > >
    > >

    >
    >
    >
    =?Utf-8?B?TWlsb3N6IFNrYWxlY2tpIFtNQ0FEXQ==?=, Nov 17, 2007
    #5
  6. Bob

    Teemu Keiski Guest

    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" <> wrote in message
    news:...
    > 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" <> schreef in bericht
    > news:%...
    >> 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" <> wrote in message
    >> news:...
    >>> 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, 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" <> wrote in message
    >>> news:%23UgjQ%...
    >>>> 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
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >
    Teemu Keiski, Nov 17, 2007
    #6
  7. Bob

    Bob Guest

    Thanks to both

    "Teemu Keiski" <> schreef in bericht
    news:%...
    > 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" <> wrote in message
    > news:...
    >> 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" <> schreef in bericht
    >> news:%...
    >>> 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" <> wrote in message
    >>> news:...
    >>>> 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, 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" <> wrote in message
    >>>> news:%23UgjQ%...
    >>>>> 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
    >>>>>
    >>>>
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >
    Bob, Nov 17, 2007
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ante Perkovic

    How to get rid of Page_ClientValidate() ?

    Ante Perkovic, Jul 1, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    6,089
    William F. Robertson, Jr.
    Jul 1, 2003
  2. James Vanns
    Replies:
    7
    Views:
    7,035
    Evan Carew
    Jan 21, 2004
  3. komal
    Replies:
    6
    Views:
    1,420
    msalters
    Jan 25, 2005
  4. =?Utf-8?B?RGVlcHNvbiBUaG9tYXM=?=

    Regarding Page_ClientValidate() function

    =?Utf-8?B?RGVlcHNvbiBUaG9tYXM=?=, May 12, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    60,161
    ademoo
    Aug 22, 2008
  5. Replies:
    2
    Views:
    921
    Bengt Richter
    Aug 1, 2005
Loading...

Share This Page