Hi,
I am making an application usign MVC and LINQ.
I have a controller called home which does this:
Dim notes = From x In dal.tbl_notes _
Join y In dal.tbl_note_users On y.user_id Equals x.note_id _
Select x.note, x.datestamp, y.is_owner, y.note_user_id
ViewData("notes") = notes
Return View()
And a page called home which has this code for displaying the output:
<% For Each note In ViewData("notes")%>
<%=Html.Encode(note.ToString)%>
<% next %>
However, the output looks like this:
{ note = vbnv, datestamp = , is_owner = True, note_user_id = 1 }
How can i output individual columns (like note or datestamp)? Is there a better way of doing this?
I have tried using viewdata.model but the data is from two different tables, so i can't say what type it is.
Thanks