c# - Textbox Error when i will not input data -


how code if there no input data in text box , when press tab go next text box there should message "this fields required" before proceeding next..in c# code save no data.

can me this?? project enrollment system. thank you

handle textbox's validating event.

private void textbox1_validating(object sender, canceleventargs e) {     if (string.isnullorempty(textbox1.text)) {         messagebox.show("this fields required");         e.cancel = true;     } }         

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -