C textbox1 validating

just now i am beginning to work with windows forms now i have to add a text box and a insert button now when iam entering the text it should be inserted when the button is clicked.

now wht i need is that when the text box is empty and when i clicked the button , it should show a message saying that textbox is empty I Think this is very smalll problem. d h o l You need to test the length of the text in the textbox Your textbox has a 'Text' attribute, as well as others.

Hi, I have a textbox that has a Cancel Event Handler attatched to it to validate the data entered by the user. If this is the case, then it should not cause the textbox to throw the validate event. You might also have to set the same property on the Form to false too, to stop the window close button causing validation.

Within your "Accept" button click handler (the "save" button) process each control that Causes Validation to ensure that they are all valid... (Assuming you are not placing conflicting date in there by the program) It will be executed as that control looses the focus. Cor Phill, Now I understood you, in fact do you want to check if they are not empty?

Hope this helps Jay "norton" Hi All, I am writing a simple win form which contains a button, when user click the button i want to validate all the other textbox and see if there is anything goes wrong may i know how can i trigger the validating event for all text box?

However you can in my opinion for ever do (not tested) sub Button Click event textbox1_validating(textbox1,nothing) textbox2_validating(textbox2,nothing) etc.

end sub As alternative for the already supplied options, while not knowing what actions you take because of validationg errors.

Leave a Reply

Your email address will not be published. Required fields are marked *

One thought on “c textbox1 validating”