Skip to content

In View @foreach loop not working it shows error!!! #9

@AmitRathod07

Description

@AmitRathod07

Screenshot 2023-03-29 163043

    <table>
        <thead>
            <tr>
                <th>@Html.DisplayNameFor(model => model.ProfilePictureURL)</th>
                <th>@Html.DisplayNameFor(model => model.FullName)</th>
                <th>@Html.DisplayNameFor(model => model.Bio)</th>
                <th>Actions</th>
            </tr>
        </thead>
        <tbody>
            **@foreach (var item in Model)**
            {
                <tr>
                    <td class="align-middle">
                        <img class="rounded-circle" src="@item.ProfilePictureURL" alt="@item.FullName" style="max-width: 150px" />
                    </td>
                    <td class="align-middle">
                        @Html.DisplayFor(modelItem => item.FullName)
                    </td>
                    <td class="align-middle">
                        @Html.DisplayFor(modelItem => item.Bio)
                    </td>
                    <td class="align-middle">
                        <a class="btn btn-outline-primary"><i class="bi bi-pencil-square"></i>Edit </a> |
                        <a class="btn btn-outline-info"><i class="bi bi-eye"></i>Details </a> |
                        <a class="btn btn-danger text-white"><i class="bi bi-trash"></i>Delete </a>
                    </td>
                </tr>
            }
        </tbody>
    </table>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions