Results 1 to 3 of 3

Thread: [2.0] Button has been clicked

  1. #1

    Thread Starter
    Frenzied Member CoachBarker's Avatar
    Join Date
    Aug 2007
    Location
    Central NY State
    Posts
    1,121

    [2.0] Button has been clicked

    I have some code in a validating event of a text box that is not supposed to be run if the Causes Validation property of a button is set to false. Well it is set to False, I even tried setting it to false at run time but it stills fires the validation event when the form closes to go back to the main form.

    Any suggestions?

    I did try it in a separate project and it works like it is supposed to.
    Thanks
    CoachBarker

    Code Bank Contribution
    Login/Manage Users/Navigate Records
    VB.Net | C#

    Helpful Links: VB.net Tutorial | C Sharp Tutorial | SQL Basics

  2. #2
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    Re: [2.0] Button has been clicked

    please show us the code you are using and the steps you used to create the logic/code

    MVP 2007-2010 any chance of a regain?
    Professional Software Developer and Infrastructure Engineer.

  3. #3
    Fanatic Member Andy_P's Avatar
    Join Date
    May 2005
    Location
    Dunstable, England
    Posts
    669

    Re: [2.0] Button has been clicked

    Are you modifying the contents of the TextBox and then clicking the button directly?

    The validation code should not run if the TextBox has focus and then you click the button, i.e. move focus to the button, or any other control that has CausesValidation set to false for that matter.

    Hope I haven't misunderstood your problem.
    Using Windows XP Home sp3
    Mucking around with C# 2008 Express
    while ( this.deadHorse ) { flog( ); }


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