c# - If RegularExpression Validator catches an error do x in WebForms -


i quite new asp.net , quite unsure of lot of things , learning go. in 1 of forms have made have validated fields, , if data not of correct format throw error below.

enter image description here

if data ok shows graph below.

enter image description here

the problem having if user changes fields , throw , error can't seem remove table, , error appears below table.

enter image description here

i can't put table.visible = false in method creates table assuming error validator prevents method running. same reasons can't seem put in postback method either. wondering if there way can check whether validator has caught error , turn table visiblity false?

so theoretically:

if (validatorcaughterror == true) { table.visiblity = false; }


Comments