Working on a project where I compare two string, how ever the string do match but it returns false for some reason...
This is the code I try to run to compare:
@using (Html.BeginForm("Index", "Projects", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
{
var allProjects = ViewData["allProjects"] as List<Project>;
<h3>
<a href="#">Inhouse projekt</a>
</h3>
<div>
@{
Html.RenderPartial("Projects", allProjects.Where(x => x.ProjectStatu.Name == "Pågående - Inhouse"));
}
</div>
<h3>
<a href="#">Outhouse projekt</a>
</h3>
<div>
@{
Html.RenderPartial("Projects", allProjects.Where(x => x.ProjectStatu.Name == "Pågående - Outhouse"));
}
</div>
<h3>
<a href="#">Övriga projekt</a>
</h3>
<div>
@{
Html.RenderPartial("Projects", allProjects.Where(x => x.ProjectStatu.Name != "Pågående - Inhouse" && x.ProjectStatu.Name != "Pågående - Outhouse" && x.ProjectStatu.Name != "Avslutat"));
}
</div>
<h3>
<a href="#">Avslutade projekt</a>
</h3>
<div>
@{
Html.RenderPartial("Projects", allProjects.Where(x => x.ProjectStatu.Name == "Avslutat"));
}
</div>
<input type="submit" value="Spara" id="submit" name="submit" style="padding: 5px 20px 5px 20px; float: right;" />
}
}
Aucun commentaire:
Enregistrer un commentaire