Form no longer submits - client validator problem?

Discussion in 'ASP .Net' started by Wysiwyg, Apr 25, 2005.

  1. Wysiwyg

    Wysiwyg Guest

    I'm going back to a previous asp.net (C#) web project after a few months of
    inactivity and my first form, the login, won't submit. I ran with the
    debugger and still can't see how to resolve this. I am developing with
    VS2003 and on Windows 2000 Server and have all of the service packs for .NET
    and Windows. The application is running on an intranet and I'm running this
    test with IE6. Javascript is functional.

    The logon form has text fields for userid and password with a submit button.
    The form doesn't submit either by pressing the submit button or by using the
    enter key. This worked fine a few months ago.

    If I set the page's ClientTarget property to DownLevel, which bypasses the
    client-side validation for required fields completely, the form works. I
    made sure the latest WebUIValidation.js is in the
    C:\Inetpub\wwwroot\aspnet_client\system_web\1_1_4322\ directory by comparing
    to the base files in
    C:\WINNT\Microsoft.NET\Framework\v1.1.4322\ASP.NETClientFiles\ . I also
    cleared out the temporary files under the v1.1.4322 directory.

    The event handlers are still in the InitializeComponent so my events haven't
    been wiped, i.e. I still have a "this.BtnSubmit.Click += new
    System.EventHandler(this.BtnSubmit_Click);" line in the source. The submit
    button does attempt to submit the form.

    The form has two fields, user and password, plus a submit button. The
    client-side validation still works correctly. If I leave a field blank the
    errors show in the validation summary as I'd expect and are cleared if I
    fill in the user and password fields as they should be prior to submitting
    if the client side validation succeeds.

    I added a break to the form tag line in the debugger. The form tag in the
    generated html looks like so:

    <form name="logon" method="post"
    action="logon.aspx?ReturnUrl=%2ffsp%2fdefault.aspx" language="javascript"
    onsubmit="if (!ValidatorOnSubmit()) return false;" id="logon">

    I added a break to the generated ValidatorOnSubmit() function which looks
    like so:

    function ValidatorOnSubmit() {
    if (Page_ValidationActive) {
    return ValidatorCommonOnSubmit();
    }
    return true;
    }

    This is returning TRUE but the form still doesn't submit. The
    ValidatorOnSubmit and onsubmit inline code were generated and not explicitly
    created by me.

    Other webs on the same development server still work. I tried deleting and
    creating the application in the IIS Manager but that didn't change the
    behavior.

    The form's onsubmit="if (!ValidatorOnSubmit()) return false;" doesn't
    explicitly return TRUE but this shouldn't matter.

    Can anyone think of anything else I can check to see what is causing the
    problem now?

    Thanks for any help you can provide.

    Bill
    Wysiwyg, Apr 25, 2005
    #1
    1. Advertising

  2. > VS2003 and on Windows 2000 Server and have all of the service packs for
    > .NET


    The service pack reference makes me think of this:

    BUG: The Submit button on ASP.NET pages does not work after you install the
    ..NET Framework 1.1 Service Pack 1

    http://support.microsoft.com/default.aspx?scid=kb;en-us;889877

    "Wysiwyg" <> wrote in message
    news:d4jr2k$2kk$...
    > I'm going back to a previous asp.net (C#) web project after a few months
    > of
    > inactivity and my first form, the login, won't submit. I ran with the
    > debugger and still can't see how to resolve this. I am developing with
    > VS2003 and on Windows 2000 Server and have all of the service packs for
    > .NET
    > and Windows. The application is running on an intranet and I'm running
    > this
    > test with IE6. Javascript is functional.
    >
    > The logon form has text fields for userid and password with a submit
    > button.
    > The form doesn't submit either by pressing the submit button or by using
    > the
    > enter key. This worked fine a few months ago.
    >
    > If I set the page's ClientTarget property to DownLevel, which bypasses the
    > client-side validation for required fields completely, the form works. I
    > made sure the latest WebUIValidation.js is in the
    > C:\Inetpub\wwwroot\aspnet_client\system_web\1_1_4322\ directory by
    > comparing
    > to the base files in
    > C:\WINNT\Microsoft.NET\Framework\v1.1.4322\ASP.NETClientFiles\ . I also
    > cleared out the temporary files under the v1.1.4322 directory.
    >
    > The event handlers are still in the InitializeComponent so my events
    > haven't
    > been wiped, i.e. I still have a "this.BtnSubmit.Click += new
    > System.EventHandler(this.BtnSubmit_Click);" line in the source. The submit
    > button does attempt to submit the form.
    >
    > The form has two fields, user and password, plus a submit button. The
    > client-side validation still works correctly. If I leave a field blank the
    > errors show in the validation summary as I'd expect and are cleared if I
    > fill in the user and password fields as they should be prior to submitting
    > if the client side validation succeeds.
    >
    > I added a break to the form tag line in the debugger. The form tag in the
    > generated html looks like so:
    >
    > <form name="logon" method="post"
    > action="logon.aspx?ReturnUrl=%2ffsp%2fdefault.aspx" language="javascript"
    > onsubmit="if (!ValidatorOnSubmit()) return false;" id="logon">
    >
    > I added a break to the generated ValidatorOnSubmit() function which looks
    > like so:
    >
    > function ValidatorOnSubmit() {
    > if (Page_ValidationActive) {
    > return ValidatorCommonOnSubmit();
    > }
    > return true;
    > }
    >
    > This is returning TRUE but the form still doesn't submit. The
    > ValidatorOnSubmit and onsubmit inline code were generated and not
    > explicitly
    > created by me.
    >
    > Other webs on the same development server still work. I tried deleting and
    > creating the application in the IIS Manager but that didn't change the
    > behavior.
    >
    > The form's onsubmit="if (!ValidatorOnSubmit()) return false;" doesn't
    > explicitly return TRUE but this shouldn't matter.
    >
    > Can anyone think of anything else I can check to see what is causing the
    > problem now?
    >
    > Thanks for any help you can provide.
    >
    > Bill
    >
    >
    Ken Cox [Microsoft MVP], Apr 25, 2005
    #2
    1. Advertising

  3. Wysiwyg

    Wysiwyg Guest

    Thanks, that did the job. I copied the scripts manually but that didn't do
    the trick for some reason.

    I ran "C:\WINNT\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis.exe -c" and
    that did the job.

    "Ken Cox [Microsoft MVP]" <> wrote in message
    news:%...
    > > VS2003 and on Windows 2000 Server and have all of the service packs for
    > > .NET

    >
    > The service pack reference makes me think of this:
    >
    > BUG: The Submit button on ASP.NET pages does not work after you install

    the
    > .NET Framework 1.1 Service Pack 1
    >
    > http://support.microsoft.com/default.aspx?scid=kb;en-us;889877
    >
    > "Wysiwyg" <> wrote in message
    > news:d4jr2k$2kk$...
    > > I'm going back to a previous asp.net (C#) web project after a few months
    > > of
    > > inactivity and my first form, the login, won't submit. I ran with the
    > > debugger and still can't see how to resolve this. I am developing with
    > > VS2003 and on Windows 2000 Server and have all of the service packs for
    > > .NET
    > > and Windows. The application is running on an intranet and I'm running
    > > this
    > > test with IE6. Javascript is functional.
    > >

    [snip]
    > > Can anyone think of anything else I can check to see what is causing the
    > > problem now?
    > >
    > > Thanks for any help you can provide.
    > >
    > > Bill
    > >
    > >

    >
    >
    Wysiwyg, Apr 26, 2005
    #3
    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. Robert V
    Replies:
    1
    Views:
    1,174
    Jeremy Fluhmann
    Jul 21, 2003
  2. Scott M.

    Run JavaScript before Form Submits

    Scott M., Nov 17, 2003, in forum: ASP .Net
    Replies:
    14
    Views:
    7,057
    Joe Gass
    Nov 18, 2003
  3. Stan
    Replies:
    1
    Views:
    2,516
    Jacob Yang [MSFT]
    Dec 3, 2003
  4. Mad Scientist Jr
    Replies:
    1
    Views:
    533
    bruce barker
    Mar 5, 2004
  5. Ken Adams
    Replies:
    4
    Views:
    9,466
    Sagar@1
    Jan 22, 2013
Loading...

Share This Page