4
Answers

.Net Mvc ViewData

Photo of buka bidzina

buka bidzina

6y
527
1
hello everyone.I have viewdata and i want to loop through it like that way in my view.
@foreach(var item in ViewData["DataName"] as IList<DataName>).Where(x=>x.Id==1)
 
Can i do that or is there a way to make this?

Answers (4)