Answer the question
In order to leave comments, you need to log in
How to properly validate ASP.NET?
Let's say we have a "Person" model, which has the usual list of properties (id, name, age). It also has a property - does it work now (yes / no), in the case of a positive option - add a new field - place of work, in the case of a negative one - remove it.
How to apply validation on the "place of work" field, because this field may not exist?
Answer the question
In order to leave comments, you need to log in
For all users to keep a list of jobs. but only if the user marks (that works) isEmployed then we add it to the list and display the additional menu in the gui.
Plus, can you use it? (null collision operator) when getting the list (and again, if it returns null, then we don't show anything).
Use construction
if(/*если работает сейчас*/){
/*выполнить необходимые действия с полем*/
}
else{
/*оставить в поле значение null*/
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question