How to cast LINQ generated anonymous data type list from DataView ASP .NET MVC?

The best thing to do will be to create a class in your model so that you have a List items to assign your data to and then to repeat through rather than using ViewData or Viewbags. Then in your foreach loop, the var item will have dot (.) properties foreach (var item in Model. MyClassItems) { @item.

Classproperty }.

The best thing to do will be to create a class in your model so that you have a List items to assign your data to and then to repeat through rather than using ViewData or Viewbags. Then in your foreach loop, the var item will have dot (.) properties. @foreach (var item in Model.

MyClassItems) { @item. Classproperty }.

This would be using stronly typed data properties giving you the visibility in the view that you need – richman64 11 mins ago Thanks for the input, bro! I found the solution. It is under UPDATES: – Dmitry Boyko 10 mins ago.

Asp.net mvc - How to cast LINQ generated anonymous data type list from DataView ASP . NET MVC? - Stack Overflow.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions