skip to Main Content

ASP.net multiple select always returns 0 selected items

So i'm trying to build a User multi-select in order to get the participants to a project. This is my code: <form asp-page-handler="ProjectModalPartial"> @*numele metodei*@ <input name="IsValid" type="hidden" value="@ViewData.ModelState.IsValid.ToString()" /> <div class="form-group"> <label asp-for="ProjectsModel.ProjectName">Title</label> <input asp-for="ProjectsModel.ProjectName" class="form-control" placeholder="MyProject1" /> <span…

VIEW QUESTION

ASP.NET : get value from url

I'm trying to get a value from the URL and save it to a value but any attempt I've made has failed. Here is an example of the URL: https://localhost:44325/deals/PostDeal?id=101 I want to save the value of id to DealsMasters.DealItemID.…

VIEW QUESTION

The expression is invalid inside an 'Include' operation, since it does not represent a property access: – Asp.net

Controller: [HttpGet] [Route("MIDKalorimetar/Delete/{Id}/{Id2}/{Id3}/{Id4}/{Id5}")] public async Task<IActionResult> Delete(DeleteKalorimetarVM modelVM) { var model = await _db.ParametriMjerila.Where(x => x.Id == modelVM.Id).Include(d => d.Id == modelVM.Id2).Include(x=>x.Id == modelVM.Id3).Include(x => x.Id == modelVM.Id4).Include(x => x.Id == modelVM.Id5).FirstOrDefaultAsync(); return PartialView("Delete", model); } [HttpPost] public async Task<IActionResult>…

VIEW QUESTION
Back To Top
Search