Results 1 to 6 of 6

Thread: [RESOLVED] client side validators

  1. #1

    Thread Starter
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Resolved [RESOLVED] client side validators

    Given an ASPX page with a textbox, a requiredfieldvalidator, and 2 buttons.

    If I want to only have the requiredfieldvalidator validate that data is in the textbox if button1 is clicked but not button2, is my only option to set EnableClientScript to false and do validation on the postback?

    Or have they implemented a way where you can still do the client side validation, but specify for it to only occur if button1 is clicked and not button2?

  2. #2
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: client side validators

    Hey,

    You can set the CausesValidation property of the other TextBox:

    http://msdn.microsoft.com/en-us/libr...alidation.aspx

    Gary

  3. #3

    Thread Starter
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: client side validators

    You mean of the button?

  4. #4
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: client side validators

    Yes, that is exactly what I meant

    Sorry, wasn't concentrating

  5. #5

    Thread Starter
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: client side validators

    Looks to be what I was after. Thanks.

    This was always such a headache in ASP.NET 1.1

  6. #6
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: [RESOLVED] client side validators

    I never really had the privilege of doing ASP.Net 1.1, I jumped straight into .Net 2.0, but I have heard that there were a number of things, like this, that were just hideous in the earlier version.

    Gary

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