I am writing a page with several text fields and a dropdown. Fields in the drop-down list affect the meaning of the text fields.
For example: drop-down list options are "a" and "b". The text fields are "first name" and "last name". When selecting “a,” “name” is populated with “Joe.” When "b" is selected, the name "is populated with" Bob ".
I wrote a class containing a drop-down display name and values for "name" and "last name".
Question: from the point of view of design, what is the right solution - changing the class with text fields or changing text fields from the outside and only access to class data?
Thank.
PS - I use ASP.Net and Javascript, but this is more a design issue, not a language.
source
share