skip to Main Content

Want to get disabled select field value when form is submitted – Asp.net

I have one form and in that one dropdown is in disabled status as per below : <div class="form-group"> <label asp-for="ItemEditModel.ProjectJobId" class="form-label required"></label> <div class="form-group"> <select class="form-control" asp-for="ItemEditModel.ProjectJobId" asp-items="Model.ProjectJobList" disabled></select> </div> <span class="text-danger" asp-validation-for="ItemEditModel.ProjectJobId"></span> </div> Now when we submit form…

VIEW QUESTION

After migrating to .NET 5 shows an error "Use of unassigned local variable" for out parameter – Asp.net

public bool TryGetCustomerId(out Guid customerId) { customerId = Guid.Empty; if (_contextAccessor.HttpContext?.Request.Headers.TryGetValue(CustomKnownHeaders.CustomerId, out var values) ?? false) { return Guid.TryParse(values.FirstOrDefault(), out customerId); } return false; } After migrating from .NET Core 3.1 to .NET 5 shows an error "Use of unassigned…

VIEW QUESTION
Back To Top
Search