In below example we will see how we can pass data from the controller to view.
In the previous example, we will see how DateTime is passed from the Controller to View
There are two ways to pass the data from controller to view
There are two ways to pass the data from controller to view
- ViewData
- ViewBag
We have used ViewData in the below example
In the view, we can retrieve the data in view by ViewData
No comments:
Post a Comment