1
Answer

Display data on view

Akash Patil

Akash Patil

8y
180
1
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)