Id required in my form thus causing errors
@if (!ViewData.ModelState.IsValid) { <div class=”validation-summary-errors”> @foreach (var state in ViewData.ModelState) { foreach (var error in state.Value.Errors) { <p>@state.Key :: @error.ErrorMessage</p> } } </div> } In this part of view, it displayed Question.Quiz :: The Quiz field is required. Answer[0].Question :: The Question field is required. Answer[1].Marks :: The value ” is invalid. Answer[1].Question :: The […]
Id required in my form thus causing errors
@if (!ViewData.ModelState.IsValid) { <div class=”validation-summary-errors”> @foreach (var state in ViewData.ModelState) { foreach (var error in state.Value.Errors) { <p>@state.Key :: @error.ErrorMessage</p> } } </div> } In this part of view, it displayed Question.Quiz :: The Quiz field is required. Answer[0].Question :: The Question field is required. Answer[1].Marks :: The value ” is invalid. Answer[1].Question :: The […]
Id required in my form thus causing errors
@if (!ViewData.ModelState.IsValid) { <div class=”validation-summary-errors”> @foreach (var state in ViewData.ModelState) { foreach (var error in state.Value.Errors) { <p>@state.Key :: @error.ErrorMessage</p> } } </div> } In this part of view, it displayed Question.Quiz :: The Quiz field is required. Answer[0].Question :: The Question field is required. Answer[1].Marks :: The value ” is invalid. Answer[1].Question :: The […]
How to open URL in new tab on C# ASP.NET Core MVC
I’ve tried ScriptManager but the System.Web.Extension
is not available to add on project references. So I’m asking for another way to call URL and open it in a new tab. I know response.redirect calls URL but I don’t know how to redirect it to the new tab.
How do the class libraries know where to find their dependency (other class libraries)?
I hope my title is not too confusing. So I have an assisting assembly and have built it into one dll file (let’s call it reference.dll), which I want to use in another project (Let’s call it main project).
Why my edit method don’t work in ASP.NET Core
I had a EditEmployee
method in AdminController
. When I submit the edit form it display the error 404. It seem that the method don’t recognize the EmployeeId
I bind but I can’t figure out
how to insert dto mssql return table in c#
i wants insert returen table from MSSQL to DTO.
from my lession suggest as below throught this one can’t handle many datas
please let know other method.