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)
{
@item.DealerId
}
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
1 Reply
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Midhun TpPosted Sep 5, 2016, 4:09 AM