Pass data from View
to controller using Model in MVC
In my last
article series I explained how we can pass data from view to controller using
Request, FormCollection etc.
In this
article I am explaining how you can access data from view to controller using
Model.
In my last article I explained how to insert data in database using Ado.net. I am taking
the same example for explain this concept. In last article we take data from
view to controller using Request object.
In my
article series I also explained the HTML Helper class in which we used method
to generate the HTML control. For example to generate the textbox we use the
following method:-