1
votes

I am having some textboxes and dropdownlist controls but if i select the ddl value the validation errors are disappearing and after the button click they are reappearing but i want to show the errors even after a postback how can i do this??

3

3 Answers

2
votes

Could you post your code so we can perhaps see what the specific issue might be? Without seeing any code, I would say try adding this into the Page_Load function:

if (IsPostBack)
    Page.Validate();

Alternatively, add this to your DropDownList or whatever controls are initiating the postback:

CausesValidation="true"

.. as per the answer here: Validators do not Validate after postback occurs

1
votes

Please remove your asp.net validators if added with the controls and also remove any client side validation in Java script. Now add validation code on the page you are redirecting to. If that validation fails redirect back to the controls page with proper messages to be shown

0
votes

If you dont like the default behavior - don't use validation controls and implement them by yourself using client side programming.