hi.
I got this query below that's printing rows with curly braces '{' in view. How can I fix that?
Lambda Query:
Code
var q = db.table1.Where(n => n.user== USER).Select(n => new { n.Name, n.LastName });
ViewBag.test = q;Code
@foreach (var item in ViewBag.test) { @item } { Name = john, LastName=Smith} { Name = Mike, LastName=mojie}
Thanks in advance

VulpesRank #55 · 29.2K reputationPosted Sep 29, 2014, 1:33 PM EDT
var q = db.table1.Where(n => n.user== USER)
.Select(n => String.Format("{0}, {1}", n.Name, n.LastName));
ViewBag.test = q;
arun prasath94 reputationPosted Oct 6, 2014, 3:57 AM EDT