Hi,
I am facing problem in displaying the column field value at the view.
I am returning view like follows.
var TicketList = (from T in db.Tickets
where T.Title.Contains("a")
select new {
customerName = (
from cname in db.Customers
where cname.CustomerId == T.CustomersId
select cname.FirstName + cname.LastName
) ,
Title = T.Title
}).ToList();
return View("SearchTicketsResult",TicketList);
and at the view page I have
<%foreach (TicketList ti in (IEnumerable)ViewData.Model) {%>
<%=ti.Title%><br />
<%=ti.customerName %>
<% } %>
I am not able to list customername or the title in the page. It says "The type or namespace name 'TicketList' could not be found (are you missing a using directive or an assembly reference?)"
Can someone guide me please.
Thanks in advance.