PartialView_Slider Doldurma_PartialVeriAl
<pre> <code>@using ErpProject.Class @model IEnumerable<UrunModel> @{ ViewBag.Title = "Index"; } @if (Model.Count() > 0) { <div id="carouselExampleControls" class="carousel slide" data-ride="carousel"> <div class="carousel-inner"> <div class="carousel-item active" style="margin-left:400px"> <img src="~/@Model.First().Resim" style="width:250px;height:250px" class="" alt="..."> </div> @foreach (var item in Model.Where(b => b.UrunId > @Model.First().UrunId)) { <div class="carousel-item" style="margin-left:400px"> <img src="~/@item.Resim" style="width:250px;height:250px" class="" alt="..."> </div> } </div> <a class="carousel-control-prev" href="#carouselExampleControls" role="button" data-slide="prev"> <span class="carousel-control-prev-icon" aria-hidden="true"></span> <span class="sr-only">Previous</span> </a> <a class="carousel-control-next" href="#carouselExampleControls" role="button" data-slide="next"> <span class="carousel-control-next-icon" aria-hidden="true"></span> <span class="sr-only">Next</span> </a> </div> } </code></pre>
0 Yorum