asp.net mvc - passing values between views in mvc? -


I'm new to MVC I want to send values ​​between the view and I do not know How does this happen?
Also I want to send the selected item to the second view in the grid .

The view is used to show data passed only with one controller action. Therefore, technically you need to send data to another controller action compared to the current view provided. A standard way of sending data in controller action is to send a GET / POST request to this action and pass the parameters in the URL or POST body. Other commonly used storage is TempData , session and cache .

Answer to the second part of your question as to how you have been given this grid, how to choose an item, you need to provide more information on how you are going to another controller action. Will be. For example, you can enter a & lt; Form & gt; , which has a hidden field, indicating the current item.


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -