i often seen the below picture is used to show the relation between controller,view and model in asp.net mvc project. i do not know much about asp.net MVC but still i guess first request is process by controller and controller gets data from model and push that data to view by controller just to populate the view.
if anyone see the below image then probably notice that view can interact with model but that is not true. why people use the image for showing the relationship for mvc. if the above image is right so anyone please tell me how view can pass any info to model directly with taking any help from controller. please explain what the image is trying to say in details. thanks
The model–view–controller design defines the interactions between them.
A controller can send commands to the model to update the model's state (e.g., editing a document). It can also send commands to its associated view to change the view's presentation of the model (e.g., by scrolling through a document).
A model notifies its associated views and controllers when there has been a change in its state. This notification allows the views to produce updated output, and the controllers to change the available set of commands. In some cases an MVC implementation may instead be 'passive' and other components must poll the model for updates rather than being notified.
A view requests information from the model that it uses to generate an output representation to the user.
The view can interact with the model through a feature called model binding.
So for example, you have a view that will post back to a controller. If the view is tied to a model then the MVC Framework will loop through all of the form elements and match them up with the properties in the Model, and then pass the filled model over to the controller.
I would recommend going through a few tutorials over at www.asp.net[^] so you get a better understanding from a hands on approach.