| Share this post! | Vote this! |
|
The ASP.NET MVC framework provides page-level containers that can pass data between controllers and views. This topic explains how to pass both weakly typed and strongly typed data in an MVC application. It also explains how to pass temporary state data between action methods
Passing Data Between a Controller and a View To render a view, you call the View method of the controller. To pass data to the view, you use the ViewData property of the ViewPage class. This property returns aViewDataDictionary object that has case-insensitive string keys. To pass data to
the view, you can assign values to the dictionary, as shown in the following example: more...
Passing Data Between a Controller and a View To render a view, you call the View method of the controller. To pass data to the view, you use the ViewData property of the ViewPage class. This property returns aViewDataDictionary object that has case-insensitive string keys. To pass data to
the view, you can assign values to the dictionary, as shown in the following example: more...




0 comments:
Post a Comment