We have an ASP.Net webforms page. On the page load event, the page fills some inputs with data. Then blocks them so a user cannot edit them. Unfortunately some data appears to be wrong, so the ASP.Net validators won’t allow the user to post the form.
There was a decision to unblock the invalid inputs to allow users to edit them. We have a number of ASP.Net validators on the page, including custom validators. Can I use these validators to validate data in the OnLoad event and unblock the invalid fields or do I need to unblock them manually checking every field? What is the best way to achieve the result?
Since there is no code, I’m only guessing this should work with your logic. Basically, after you set the value for all of the fields, you can run
Page.Validate()and set the visibilities based on the validity of the data.