Results 1 to 3 of 3

Thread: Validator help

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2005
    Posts
    73

    Exclamation Validator help

    I have a required field validator that i set to validate a textbox. Even when the text box is empty the accept button code still executes.. is this suppost to happen?

  2. #2
    Banned timeshifter's Avatar
    Join Date
    Mar 2004
    Location
    at my desk
    Posts
    2,465

    Re: Validator help

    In the button_Click event, add this:
    Code:
    If Page.IsValid Then
    'whatever code you have here
    End If

  3. #3
    Hyperactive Member kayos's Avatar
    Join Date
    Apr 2004
    Location
    Largo, Florida
    Posts
    306

    Re: Validator help

    also, if you put a <asp:ValidationSummary> on the page then it should also be able to stop it with Javascript on the client side... but good practice is to also do what timeshifter has pointed out and use the Page.IsValid to also get it validated on the server side.


    If this post helps, please RATE MY POST!

    Using Visual Studio 2005 SE

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width