I have one view with a form and I want when a button will be clicked, the same view to be reloaded with new informations from the form’s textbox values. The new informations will be found in a database – I’m doing that in the controller.
So, I thought I should call an action method from the view.
But, I read that it is poor practice to transfer data from the view to the cantroller, since MVC is designed especially NOT for that.
Does someone have an idea how to design this?
Description
The
Viewis called by theController. You can put a form in your View and send it to your ActionMethod on form submit, for example.These are fundamentals of ASP.NET MVC, you should learn it.
Sample
Model
View
Controller with ActionMethods
More Information