May be my question is going to be a little confusing, I’m building a simple booking system with asp mvc 2 (I’m a beginner) I’ve generated the CRUD views with it’s controller. When I go to ~/bookings/create appears the autogenerated create form. But it appears with textfields, well I’m working on it changing them by some dropdown lists. The question is here, how do I save the form with the selected values in all the dropdowns and the textfields?
Thank you! And sorry if It’s kind of strange question, It’s my first time on Stack Overflow.
You will need another action method adorned with [HttpPost] attribute and it will accept the same model object that you rendered as your form.
So suppose the following was your action method that you used to create your form:
You will need to create another method like the following: