26.06.2017 Views

Bootstrap for ASP.NET MVC

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Using <strong>Bootstrap</strong> Components<br />

The view <strong>for</strong> the employee's search result uses the media object component to style<br />

the employee in<strong>for</strong>mation and display the employee's photos as follows:<br />

@model IEnumerable<br />

@{<br />

ViewBag.Title = "Employees Search Results";<br />

Layout = "~/Views/Shared/_Layout.cshtml";<br />

}<br />

<br />

<br />

Employees Results Results <strong>for</strong> your search term:<br />

"@ViewBag.SearchQuery"<br />

<br />

@<strong>for</strong>each (var item in Model)<br />

{<br />

<br />

<br />

<br />

<br />

<br />

@item.FirstName @item.<br />

LastName<br />

@item.Notes<br />

@<strong>for</strong>each (var emp in @item.ReportingEmployees)<br />

{<br />

<br />

<br />

<br />

<br />

<br />

@emp.FirstName<br />

@emp.LastName<br />

@emp.Title<br />

<br />

<br />

}<br />

<br />

<br />

}<br />

<br />

[ 58 ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!