I have a List<> binded with some data in Controller action and I want to pass that List<> to View to bind with DataGrid in Razor View.
I am new to MVC.Can any
You can use the dynamic object ViewBag to pass data from Controllers to Views.
ViewBag
Add the following to your controller:
ViewBag.MyList = myList;
Then you can acces it from your view:
@ViewBag.MyList // e.g. @foreach (var item in ViewBag.MyList) { ... }