Home / Expert Answers / Computer Science / asp-net-mvc-vs-2019how-do-i-print-this-data-horizontally-in-one-row-if-reso-pa559

(Solved): ASP.NET MVC VS 2019How do I print this data horizontally in one row? @if (reso ...



ASP.NET MVC VS 2019
How do I print this data horizontally in one row?
student submitted image, transcription available below


@if (resources != null)
{
foreach (var rin in resources)
{
<span>Academic Instructor: @(rin.Academic_Instructor == 0 ? "Academic Instructor Required on Day" : "Academic Instructor Not Required on Day")
Academic Instructor: @(rin.Academic_Instructor == 0 ? "Academic Instructor Required on Day" : "Academic Instructor Not Required on Day")
GROB Flight Instructor: @(rin.GROBFlight_Instructor == 0 ? "Grob Flight Instructor Required on Day" : "Grob Flight Instructor Not Required on Day")
C12VSIM: @(rin.C12VSIM == 0 ? "C12VSIM Required on Day" : "C12VSIM Not Required on Day")
C12Flightinstructor: @(rin.C12FlightInstructor == 0 ? "C12 Flight Instructor Required on Day" : "C12 Flight Instructor Not Required on Day")
GROBFTD: @(rin.GROBFTD == 0 ? "GROB FTD Required on Day" : "GROB FTD Not Required on Day")
GROB120TP: @(rin.GROB120TP == 0 ? "GROB120TP Required on Day" : "GROB120TP Not Required on Day")
C12USIM: @(rin.C12USIM == 0 ? "C12USIM Required on Day" : "C12USIM Not Required on Day")
C12U1: @(rin.C12U1 == 0 ? "C12U1 Required on Day" : "C12U1 Not Required on Day")</span>
}

-------------------------------------------------------------------------------------------------------------------------------------------------------
@model IEnumerable<AdventureDB.Models.Training_Program>
@using AdventureDB.Models
@{
var db = new IEFWResourceDataContext();
ViewBag.Title = "Index";
}

<h2>Index</h2>
<p>
@Html.ActionLink("Create New", "Create")
</p>
<div class="body" style="background-image: url('/Images/bckgrnd.JPG'); background-size: cover; background-position: center; background-repeat: no-repeat;">
<table class="table">
<tr>
<th>
<strong>Course Type</strong>
</th>
<th>
<strong>Class Size</strong>
</th>
<th>
<strong>Training Program</strong>
</th>
<th>
<strong>Description</strong>
</th>
<th>
<strong>Start Day</strong>
</th>
<th>
<strong>End Day</strong>
</th>
<th></th>
</tr>

@{

var enumerator = Model.GetEnumerator();

while (enumerator.MoveNext())
{
var item = enumerator.Current;

<tr>
<td>@Html.DisplayFor(modelItem => item.Course_Type)</td>
<td>@Html.DisplayFor(modelItem => item.ClassSize)</td>
<td>@Html.DisplayFor(modelItem => item.Training_Prog)</td>
<td>@Html.DisplayFor(modelItem => item.Descr)</td>
<td>@Html.DisplayFor(modelItem => item.Start_Day)</td>
<td>@Html.DisplayFor(modelItem => item.End_Day)</td>
<td>
@{
var resources = db.IEFWResources.Where(r => r.IEFWID == item.CourseTypeID);
}

@if (resources != null)
{
foreach (var rin in resources)
{
<span>Academic Instructor: @(rin.Academic_Instructor == 0 ? "Academic Instructor Required on Day" : "Academic Instructor Not Required on Day")
Academic Instructor: @(rin.Academic_Instructor == 0 ? "Academic Instructor Required on Day" : "Academic Instructor Not Required on Day")
GROB Flight Instructor: @(rin.GROBFlight_Instructor == 0 ? "Grob Flight Instructor Required on Day" : "Grob Flight Instructor Not Required on Day")
C12VSIM: @(rin.C12VSIM == 0 ? "C12VSIM Required on Day" : "C12VSIM Not Required on Day")
C12Flightinstructor: @(rin.C12FlightInstructor == 0 ? "C12 Flight Instructor Required on Day" : "C12 Flight Instructor Not Required on Day")
GROBFTD: @(rin.GROBFTD == 0 ? "GROB FTD Required on Day" : "GROB FTD Not Required on Day")
GROB120TP: @(rin.GROB120TP == 0 ? "GROB120TP Required on Day" : "GROB120TP Not Required on Day")
C12USIM: @(rin.C12USIM == 0 ? "C12USIM Required on Day" : "C12USIM Not Required on Day")
C12U1: @(rin.C12U1 == 0 ? "C12U1 Required on Day" : "C12U1 Not Required on Day")</span>
}
}
else
{
< span > No resources available.</ span >
}
</td>
<td>
@Html.ActionLink("Edit", "Edit", new { id = item.CourseTypeID }) |
@Html.ActionLink("Details", "Details", new { id = item.CourseTypeID }) |
@Html.ActionLink("Delete", "Delete", new { id = item.CourseTypeID })
</td>
</tr>
}
}
</table>

<style>
th {
color: white;
font-weight: bold;
font-style: normal;
font-family: "Times New Roman", Times, serif;
text-align: center;
}

td {
color: yellow;
font-weight: normal;
font-style: normal;
font-family: "Times New Roman", Times, serif;
text-align: center;
}
</style>
</div>

Academic Instructor. Academic Instructor Not Required on Day Academic Instructor: Academic Instructor Not Required on Day GROB Flight Instructor: Grob Flight Instructor Not Required on Day C12VSIM: C12VSIM Not Required on Day C12Flightinstructor: C12 Flight Instructor Not Required on Day GROBFID: GROB FTD Not Required on Day GROB120TP: GROB120TP Not Required on Day C12USIM: C12USIM Not Required on Day C12U1: C12U1 Not Required on Day Academic Instructor: Academic Instructor Required on Day Academic Instructor: Academic Instructor Required on Day GROB Flight Instructor: Grob Flight Instructor Not Required on Day C12VSIM: C12VSIM Not Required on Day C12Flightinstructor: C12 Flight Instructor Not Required on Day GROBFTD: GROB FTD Not Required on Day GROB120TP: GROB120TP Not Required on Day C12USIM: C12USIM Not Required on Day C12U1: C12U1 Not Required on Day Academic Instructor: Academic Instructor Required on Day Academic Instructor: Academic Instructor Required on Day GROB Flight Instructor: Grob Flight Instructor Required on Day C12VSIM: C12VSIM Not Required on Day C12Flightinstructor. C12 Flight Instructor Not Required on Day GROBFTD: GROB FTD Required on Day GROB120TP: GROB120TP Not Required on Day C12USIM: C12USIM Not Required on Day C12U1: C12U1 Not Required on Day Academic Instructor: Academic Instructor Required on Day Academic Instructor: Academic Instructor Required on Day GROB Flight Instructor: Grob Flight Instructor Required on Day C12VSIM C12VSIM Not Required on Day C12Flightinstructor C12 Flight Instructor Not Required on Day GROBFTD: GROB FTD Required on Day GROB120TP: GROB120TP Not Required on Day C12USIM: C12USIM Not Required on Day C12U1: C12U1 Not Required on Day Academic Instructor. Academic Instructor Required on Day Academic Instructor: Academic Instructor Required on Day GROB Flight Instructor. Grob Flight Instructor Required on Day C12VSIM: C12VSIM Not Required on Day C12Flightinstructor: C12 Flight Instructor Not Required on Day GROBFTD: GROB FTD Required on Day GROB120TP: GROB120TP Not Required on Day C12USIME C12USIM Not Required on Day C12U1: C12U1 Not Required on Day Academic Insinictor. Academic Instructor Required on Day Academic Instructor: Academic Instructor Required on Day GROB Flight Instructor. Grob Flight Instructor Required on Day C12VSIM: C12VSIM Not Required on Day C12Flightinstructor. C12 Flight Instructor Not Required on Day GROBFTD: GROB FTD Not Required on Day GROB120TP: GROB120TP Required on Day C12USIM: C12USIM Not Required on Day C12U1: C12U1 Not Required on Day Academic Instructor: Academic Instructor Required on Day Academic Instructor: Academic Instructor Required on Day GROB Flight Instructor: Grob Flight Instructor Required on Day C12VSIME C12VSIM Not Required on Day C12Flightinstructor: C12 Flight Instructor Not Required on Day GROBFID: GROB FTD Not Required on Day GROB120TP: GROB120TP Required on Day C12USIM: C12USIM Not Required on Day C12U1: C12U1 Not Required on Day Academic Instructor: Academic Instructor Required on Day Academic Instructor. Academic Instructor Required on Day GROB Flight Instructor. Grob Flight Instructor Required on Day C12VSIM C12VSIM Not Required on Day C12Flightinstructor. C12 Flight Instructor Not Required on Day GROBFTD: GROB FTD Not Required on Day GROB120TP: GROB120TP Required on Day C12USIM: C12USIM Not Required on Day C12U1: C12U1 Not Required on Day Academic Instructor: Academic Instructor Required on Day Academic Instructor: Academic Instructor Required on Day GROB Flight Instructor Grob Flight Instructor Required on Day C12VSIM: C12VSIM Not Required on Day C12Flightinstructor: C12 Flight Instructor Not Required on Day GROBFTD: GROB FTD Not Required on Day GROB120TP: GROB120TP Required on Day C12USIM: C12USIM Not Required on Day C12U1: C12U1 Not Required on Day Academic Instructor: Academic Instructor Not Required on Day Academic Instructor. Academic Instructor Not Required on Day GROB Flight Instructor. Grob Flight Instructor Required on Day C12VSIM C12VSIM Not Required on Day C12Flightinstructor. C12 Flight Instructor Not Required on Day GROBFTD: GROB FTD Not Required on Day GROB120TP: GROB120TP Required on


We have an Answer from Expert

View Expert Answer

Expert Answer



To print the data horizontally in one row, you can...
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe