Prakash

Prakash

  • NA
  • 258
  • 77.4k

Display data on view

Sep 5 2016 3:18 AM
Hello experts,
 
I want to display viewbag data on the view.
 
I have following code on view..below in item object have the all values but not display ..
 
it gives error like
 
'object' does not contain a definition for 'DealeId' 
 
 
 
@foreach (var item in ViewBag.order)
{
<tr><td>
@item.DealerId
</td></tr>
 
below is may controller code
 
var ord = (from i in db.tbl_Order
join j in db.tbl_Product on i.ProductId equals j.Id
where i.BillId == id
select new {i,j.Name }).ToList();
ViewBag.order = ord;
 
 
 
Please help 

Answers (1)