Click here to Skip to main content
14,385,144 members
   

ASP.NET

 
GeneralRe: ASP.Net Core Identity Pin
Mycroft Holmes31-Oct-19 12:13
MemberMycroft Holmes31-Oct-19 12:13 
GeneralRe: ASP.Net Core Identity Pin
jkirkerx1-Nov-19 13:23
Memberjkirkerx1-Nov-19 13:23 
QuestionImporting Rows Into a List Pin
ibrahimayhans28-Oct-19 1:37
Memberibrahimayhans28-Oct-19 1:37 
QuestionASP maker 2018 Pin
Member 1292025327-Oct-19 12:23
MemberMember 1292025327-Oct-19 12:23 
AnswerRe: ASP maker 2018 Pin
Richard MacCutchan27-Oct-19 23:19
MemberRichard MacCutchan27-Oct-19 23:19 
QuestionDraw Shape in Canvas Pin
John_Ryder26-Oct-19 2:58
MemberJohn_Ryder26-Oct-19 2:58 
AnswerRe: Draw Shape in Canvas Pin
Afzaal Ahmad Zeeshan26-Oct-19 10:19
MemberAfzaal Ahmad Zeeshan26-Oct-19 10:19 
GeneralRe: Draw Shape in Canvas Pin
John_Ryder29-Oct-19 20:49
MemberJohn_Ryder29-Oct-19 20:49 
AnswerRe: Draw Shape in Canvas Pin
jkirkerx28-Oct-19 13:53
Memberjkirkerx28-Oct-19 13:53 
QuestionHow do i make my detailsviewmodel work Pin
Stefaneus22-Oct-19 7:31
MemberStefaneus22-Oct-19 7:31 
AnswerRe: How do i make my detailsviewmodel work Pin
jkirkerx23-Oct-19 11:54
Memberjkirkerx23-Oct-19 11:54 
QuestionHow do i make a bootstrap carousel work with Asp.net core Razor Pin
Stefaneus21-Oct-19 15:49
MemberStefaneus21-Oct-19 15:49 
AnswerRe: How do i make a bootstrap carousel work with Asp.net core Razor Pin
Richard Deeming22-Oct-19 2:00
MemberRichard Deeming22-Oct-19 2:00 
GeneralRe: How do i make a bootstrap carousel work with Asp.net core Razor Pin
Stefaneus22-Oct-19 6:02
MemberStefaneus22-Oct-19 6:02 
GeneralRe: How do i make a bootstrap carousel work with Asp.net core Razor Pin
Richard Deeming22-Oct-19 6:14
MemberRichard Deeming22-Oct-19 6:14 
The simplest solution would be to make it an IList<T>.

If you can't do that, you'll need to find another way to track whether you're rendering the first item. For example, using LINQ and a value tuple:
<div class="carousel-inner">
@foreach ((var img, int index) in Model.car.Images.Select((img, index) => (img, index)))
{
    string fileName = img.Filename;
    string cssClass = index == 0 ? "carousel-item active" : "carousel-item";
    <div class="@cssClass">
        <img class="img-fluid" src="~/Images/Cars/@fileName" alt="">
    </div>
}
</div>
Enumerable.Select Method (System.Linq) | Microsoft Docs[^]
C# 7 Series, Part 1: Value Tuples – Mark Zhou's Tech Blog[^]



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer

GeneralRe: How do i make a bootstrap carousel work with Asp.net core Razor Pin
Stefaneus22-Oct-19 8:04
MemberStefaneus22-Oct-19 8:04 
Answer[REPOST] How do i make a bootstrap carousel work with Asp.net core Razor Pin
Richard Deeming22-Oct-19 2:03
MemberRichard Deeming22-Oct-19 2:03 
QuestionSystem.Data.SqlClient.SqlException: 'The parameterized query '(@Name varchar(7),@Alias varchar(4),@Under_Group varchar(8000),@' expects the parameter '@Under_Group', which was not supplied.' in winforms of database in .net Pin
Member 1462438515-Oct-19 22:29
MemberMember 1462438515-Oct-19 22:29 
AnswerRe: System.Data.SqlClient.SqlException: 'The parameterized query '(@Name varchar(7),@Alias varchar(4),@Under_Group varchar(8000),@' expects the parameter '@Under_Group', which was not supplied.' in winforms of database in .net Pin
Richard MacCutchan15-Oct-19 23:06
MemberRichard MacCutchan15-Oct-19 23:06 
AnswerRe: System.Data.SqlClient.SqlException: 'The parameterized query '(@Name varchar(7),@Alias varchar(4),@Under_Group varchar(8000),@' expects the parameter '@Under_Group', which was not supplied.' in winforms of database in .net Pin
ZurdoDev16-Oct-19 9:34
MemberZurdoDev16-Oct-19 9:34 
QuestionMy Visual Studio 2017 community is opening my React-Redux Application with tsx files by default Pin
simpledeveloper9-Oct-19 8:18
Membersimpledeveloper9-Oct-19 8:18 
AnswerRe: My Visual Studio 2017 community is opening my React-Redux Application with tsx files by default Pin
jkirkerx10-Oct-19 10:55
Memberjkirkerx10-Oct-19 10:55 
GeneralRe: My Visual Studio 2017 community is opening my React-Redux Application with tsx files by default Pin
simpledeveloper16-Oct-19 9:07
Membersimpledeveloper16-Oct-19 9:07 
GeneralRe: My Visual Studio 2017 community is opening my React-Redux Application with tsx files by default Pin
jkirkerx16-Oct-19 9:33
Memberjkirkerx16-Oct-19 9:33 
GeneralRe: My Visual Studio 2017 community is opening my React-Redux Application with tsx files by default Pin
simpledeveloper16-Oct-19 11:00
Membersimpledeveloper16-Oct-19 11:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.