Click here to Skip to main content
15,946,342 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
PinnedHOW TO ANSWER A QUESTION Pin
Chris Maunder16-Jul-09 3:09
cofounderChris Maunder16-Jul-09 3:09 
PinnedHow to get an answer to your question Pin
Chris Maunder16-Jul-09 3:05
cofounderChris Maunder16-Jul-09 3:05 
QuestionRemote debugging on Raspberry Pi in Visual Studio Code. Pin
Jerry Walter 202422-Apr-24 15:02
Jerry Walter 202422-Apr-24 15:02 
AnswerRe: Remote debugging on Raspberry Pi in Visual Studio Code. Pin
jschell23-Apr-24 14:13
jschell23-Apr-24 14:13 
Questionhi please help me with a filter on view Pin
Chrayet Mahdi9-Mar-24 6:13
Chrayet Mahdi9-Mar-24 6:13 
AnswerRe: hi please help me with a filter on view Pin
jschell12-Mar-24 14:46
jschell12-Mar-24 14:46 
AnswerRe: hi please help me with a filter on view Pin
Andre Oosthuizen14-Mar-24 6:36
mveAndre Oosthuizen14-Mar-24 6:36 
Maybe a little late.

You want to sort your records by ID, not filter them. To sort the records by Id, you can use 'LINQ' to sort the 'Model' before iterating through it in your foreach loop, assuming Id is a property of the objects in your 'Model' - Sorting Operators: OrderBy & OrderByDescending[^]

Your code will look something like -
C#
@foreach (var rec in Model.OrderBy(r => r.Id))
{
    <tr>
        <td>@rec.Date.ToString("dd-MM-yyyy hh:ss")</td>
        <td>
            <a href="@Url.Action("BodyHtml", "Entreprise", new { Id = rec.UserId })" target="_blank"> @rec.MailSubject </a>
        </td>
        <td>@rec.Nb</td>
        <td>@rec.NomAlerte</td>
        <td>@rec.Email</td>
        <td>@rec.TypeAlerte</td>
    </tr>
}

QuestionAdvice on a product to convert PDF to TIFF or JPEG. Pin
PhilMcGahan2-Mar-24 3:00
PhilMcGahan2-Mar-24 3:00 
AnswerRe: Advice on a product to convert PDF to TIFF or JPEG. Pin
jschell6-Mar-24 12:12
jschell6-Mar-24 12:12 
AnswerRe: Advice on a product to convert PDF to TIFF or JPEG. Pin
TNCaver14-Mar-24 7:01
TNCaver14-Mar-24 7:01 
QuestionC#, WPF project Pin
Member 1621198528-Feb-24 2:50
Member 1621198528-Feb-24 2:50 
AnswerRe: C#, WPF project Pin
Richard Deeming28-Feb-24 3:22
mveRichard Deeming28-Feb-24 3:22 
AnswerRe: C#, WPF project Pin
Gerry Schmitz28-Feb-24 7:04
mveGerry Schmitz28-Feb-24 7:04 
AnswerRe: C#, WPF project Pin
jschell28-Feb-24 12:22
jschell28-Feb-24 12:22 
RantForm Cancel Property paired up with Button DialogResult Property is Diabolical! Pin
Brian L Hughes27-Feb-24 17:04
Brian L Hughes27-Feb-24 17:04 
QuestionGantt chart for management app c# Windows Forms Pin
Ionut Ciocan20-Feb-24 12:17
Ionut Ciocan20-Feb-24 12:17 
AnswerRe: Gantt chart for management app c# Windows Forms Pin
jeron120-Feb-24 12:33
jeron120-Feb-24 12:33 
QuestionVisual Studio 2022 and Angular Language Service Pin
Z.C.M.8-Feb-24 11:19
professionalZ.C.M.8-Feb-24 11:19 
AnswerRe: Visual Studio 2022 and Angular Language Service Pin
Gerry Schmitz9-Feb-24 9:58
mveGerry Schmitz9-Feb-24 9:58 
GeneralRe: Visual Studio 2022 and Angular Language Service Pin
jschell9-Feb-24 12:08
jschell9-Feb-24 12:08 
GeneralRe: Visual Studio 2022 and Angular Language Service Pin
Gerry Schmitz10-Feb-24 9:34
mveGerry Schmitz10-Feb-24 9:34 
GeneralRe: Visual Studio 2022 and Angular Language Service Pin
Z.C.M.12-Feb-24 3:30
professionalZ.C.M.12-Feb-24 3:30 
GeneralRe: Visual Studio 2022 and Angular Language Service Pin
Gerry Schmitz12-Feb-24 7:51
mveGerry Schmitz12-Feb-24 7:51 
AnswerRe: Visual Studio 2022 and Angular Language Service Pin
Bohdan Stupak4-Mar-24 23:09
professionalBohdan Stupak4-Mar-24 23:09 
QuestionHow to refer to the AspNetUser table(which is the default table created upon using AspNetCore.Identity;) in my Job Table in .NET Core 6 Pin
Member 139757394-Feb-24 4:53
Member 139757394-Feb-24 4:53 

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.