Displaying Authenticated Users Details In ASP.NET on MVC 4

anynub

New Member
I'm currently developing a basic system for storing health care details (only for practise, will not be used for live data). Using MVC 4 and VS 2012. System is published to Windows Azure and works (login/registration). I have created an area to display details entered into the system however, currently ALL users details are displayed at once when a logged in user view the page.I would like for only the authenticated users details to be displayed. I'm sure its down to the 'foreach' statement but I'm not sure what to replace it with?Code\[code\] @if (Request.IsAuthenticated) { foreach (var item in Model) { <tr> <td> @Html.DisplayFor(modelItem => item.FirstName) </td> <td> @Html.DisplayFor(modelItem => item.SecondName) </td> <td> @Html.DisplayFor(modelItem => item.DOB) </td>\[/code\]Thank you for your time.
 
Back
Top