This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. By joining today you can post your own programming questions, respond to other developers questions, and eliminate the ads that are displayed to guests. Hello, I am creating few dynamic textboxes and a Button control.
NET 3.5 Basics section of the Wrox Programmer to Programmer discussions.
So, I have validation on each box to ensure that their values are validation events are for controls that have editable values. your situation is not uncommon, you have a field-level validation that says 'positive integer' and a business rule that says the sum of values A and B must equal 100%.
These are for a %/% split allocation, such as 80/20, 50/50, etc.
I wish to use the Validating event on a label in VB. one way to handle this is to delay enforcing the business rule until the form is completed; this would entail validating the business rule when the user clicks the OK button (or Submit button in a web form) if you want instant validation, just have the validation method for both fields call the business-rule validation method Take look for "text changed" event, i think you missunderstand using of validation in case of controls.That means that you simply declare function name and . Since you then add the event manually here, this might be the only problem.If I'm right, then try commenting out this one line and then see if it works. Click the button below this post to show your appreciation!Accordingly, I want to place validation logic on a label that is adjacent to the two controls of which I wrote.However, despite having all of the Validation-related properties and events, the Validating event does not fire on labels, even when calling Me. According to the documentation for Causes Validation: "Gets or sets a value indicating whether the control causes validation to be performed on any controls that require validation when it receives focus." In my own testing, I had to specifically call Label. This form is just a menu and a series of textboxes and labels.My problem is: When I edit stuff in the textboxes, then click the menu to issue "Save", the text from the last text box still hasn't issued its "Validating" method.I've attempted to condense the code down to a reasonable example... hopefully there is something obviously wrong about what I'm doing here: Change submit. I have validator controls on the page that work correctly when I click the submit button. For whatever reason, whenever I click the submit button and the validation passes, the click event handler does not fire after the postback occurs. Also, it's nice to see someone (besides me) working programmatically, I find it much more powerful. -Dove Chocolate Wrapper Chroniclemaster1, Founder of You may already know this, but you may find the tag, while the literal control outputs it as is. Earth A Growing History of our Planet, by our Planet, for our Planet. Can you be more specific about this following line:? Doing so can cause your application or the operating system to stop responding.