Use CausesValidation to Prevent Unwanted Validation Checks

Use CausesValidation to Prevent Unwanted Validation Checks

Validator controls automatically trigger validation checks for every postback?irrespective of whether you need validation or not. To prevent this, set CausesValidation=”False” for the control for which you do not need validation. The code below will help illustrate:

			WebForm1												
Name Label

If you simply drop two buttons on the form, clicking either button triggers validation by default. But because you don’t need a validation check when you hit Button2, setting CausesValidation=”False” in the Button2 control will do the trick.

Share the Post:
data observability

Data Observability Explained

Data is the lifeblood of any successful business, as it is the driving force behind critical decision-making, insight generation, and strategic development. However, due to its intricate nature, ensuring the

Heading photo, Metadata.

What is Metadata?

What is metadata? Well, It’s an odd concept to wrap your head around. Metadata is essentially the secondary layer of data that tracks details about the “regular” data. The regular