Asp.net wont validate form

Discussion in 'ASP .Net' started by =?Utf-8?B?QWRyaWFu?=, May 13, 2005.

  1. Hi everyone

    I have a web form where the validation works pefectly

    I copied the file, renamed it, and all of a sudden the validation stopped
    working(on the copied form). I have two panels on them. Both have validation
    controls in them and only one panel is visible at a time. The first panel
    validtion works fine, but the 2nd one doesnt. All it has is few textboxes, a
    requiredValidator and a image command button. The valdiation is server side
    too.

    When the textbox is empty, an error is suppose to fire up. But it does not.
    I call Me.Validate manually and then check Me.IsValid but it always returns
    true. Then I even call the validation control's Validate() function and
    nothing.

    anyone has any ideas?

    Adrian
    =?Utf-8?B?QWRyaWFu?=, May 13, 2005
    #1
    1. Advertising

  2. When you copied the form, did you go back and make sure all of the internal
    names matched the copied name? If not, you might still be running against the
    old CodeBehind (assuming VS.NET 2002/3 and not VS 2005).

    I would go through debug and see what is being called. You may have also
    lost your event wiring (Handles MYButton_Click at the end of the event
    method). This is common when you dink with things outside of the normal
    day-to-day ops. If so, you are not even firing an event on that button, so
    you will not validate. In Debug, you will notice this really fast, as you
    will never hit a breakpoint.

    ---

    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA

    ***************************
    Think Outside the Box!
    ***************************

    "Adrian" wrote:

    > Hi everyone
    >
    > I have a web form where the validation works pefectly
    >
    > I copied the file, renamed it, and all of a sudden the validation stopped
    > working(on the copied form). I have two panels on them. Both have validation
    > controls in them and only one panel is visible at a time. The first panel
    > validtion works fine, but the 2nd one doesnt. All it has is few textboxes, a
    > requiredValidator and a image command button. The valdiation is server side
    > too.
    >
    > When the textbox is empty, an error is suppose to fire up. But it does not.
    > I call Me.Validate manually and then check Me.IsValid but it always returns
    > true. Then I even call the validation control's Validate() function and
    > nothing.
    >
    > anyone has any ideas?
    >
    > Adrian
    >
    =?Utf-8?B?Q293Ym95IChHcmVnb3J5IEEuIEJlYW1lcikgLSBN, May 13, 2005
    #2
    1. Advertising

  3. When I copied the form, what I really did (sorry for not being clear before)
    before is I created the file through VS.net(2002), renamed the class within
    the code. Then I just copied the html portion to the new file.

    My buttons do have their handles setup correctly too. I even deleted all the
    textboxs and the validators and recreated them and no luck.

    - Adrian

    "Cowboy (Gregory A. Beamer) - MVP" wrote:

    > When you copied the form, did you go back and make sure all of the internal
    > names matched the copied name? If not, you might still be running against the
    > old CodeBehind (assuming VS.NET 2002/3 and not VS 2005).
    >
    > I would go through debug and see what is being called. You may have also
    > lost your event wiring (Handles MYButton_Click at the end of the event
    > method). This is common when you dink with things outside of the normal
    > day-to-day ops. If so, you are not even firing an event on that button, so
    > you will not validate. In Debug, you will notice this really fast, as you
    > will never hit a breakpoint.
    >
    > ---
    >
    > Gregory A. Beamer
    > MVP; MCP: +I, SE, SD, DBA
    >
    > ***************************
    > Think Outside the Box!
    > ***************************
    >
    > "Adrian" wrote:
    >
    > > Hi everyone
    > >
    > > I have a web form where the validation works pefectly
    > >
    > > I copied the file, renamed it, and all of a sudden the validation stopped
    > > working(on the copied form). I have two panels on them. Both have validation
    > > controls in them and only one panel is visible at a time. The first panel
    > > validtion works fine, but the 2nd one doesnt. All it has is few textboxes, a
    > > requiredValidator and a image command button. The valdiation is server side
    > > too.
    > >
    > > When the textbox is empty, an error is suppose to fire up. But it does not.
    > > I call Me.Validate manually and then check Me.IsValid but it always returns
    > > true. Then I even call the validation control's Validate() function and
    > > nothing.
    > >
    > > anyone has any ideas?
    > >
    > > Adrian
    > >
    =?Utf-8?B?QWRyaWFu?=, May 13, 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. Jack Wheeler

    form wont validate on remote server

    Jack Wheeler, Jun 14, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    291
    George
    Jun 14, 2004
  2. TS
    Replies:
    3
    Views:
    346
    =?Utf-8?B?VFM=?=
    Oct 6, 2006
  3. Adrian

    Asp.net wont validate form

    Adrian, May 12, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    120
    Adrian
    May 12, 2005
  4. Advo

    text wont format from a form - email

    Advo, Aug 9, 2006, in forum: ASP General
    Replies:
    9
    Views:
    128
    Anthony Jones
    Aug 11, 2006
  5. Replies:
    1
    Views:
    679
    Randell D.
    Mar 17, 2005
Loading...

Share This Page