Forums - C# Corner

Forum guidelines
buka bidzina

buka bidzina

  • 1.7k
  • 56
  • 570

.Net Mvc ViewData

Mar 15 2019 5:44 AM
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)