Hi
I new on MVC. I want to send values between view's
and don't know how do this?
also I want send selected-item in grid to another view
.
views:
42answers:
1
A:
Views are only used to show data passed from a controller action. So technically you need to send data to another controller action than the one that rendered the current view. A standard way of sending data to a controller action consist of sending GET/POST requests to this action and passing parameters either in the url or in the POST body. Other commonly used storages are the TempData
, Session
and Cache
.
As to answer the second part of your question you will need to provide much more details on how is this grid rendered, how is an item selected, how are you navigating to another controller action? You could for example use a <form>
with a hidden field inside that indicates the current item.
Darin Dimitrov
2010-07-28 05:17:21