Design Patter for MVC Select Options #3262
-
I've an employee object with a child collection of employee categories. However, if the form is submitted the child collection (in the dropdown) isn't submitted with the form so when there is an error the page reload can load the employee object (and error messages) but the employee categories are no longer available and cannot reload the . How do people typically handle this? Do you reload the child collection in the controller? Do you simply load the child collection on the page itself? Just looking for a good pattern here. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I ended up injecting the child collection (of options) into the page. If there is a better approach I'm all ears. ;) |
Beta Was this translation helpful? Give feedback.
I ended up injecting the child collection (of options) into the page.
This seems to be the cleanest approach.
If there is a better approach I'm all ears. ;)