Most voted "asp.net-mvc-5" questions
This tag should be used when the question refers to some features only available in version 5 (currently the latest) of ASP.Net MVC. ASP.NET MVC is an open-source Microsoft framework that implements the Model View Controller architecture standards for web development. Based on ASP.Net, allows software developers to build web applications following the Model View Controller architecture standards.
Learn more…937 questions
Sort by count of
-
0
votes1
answer254
viewsChange only edited columns
In an application I am developing, when trying to update only the fields that were changed the Entity Framework is also changing the fields that do not need. Repository code: public void Update(T…
asp.net-mvc entity-framework asp.net-mvc-5 entity-framework-6asked 6 years, 5 months ago Matheus Daumas 37 -
0
votes1
answer121
viewsPull Attribute setName from another class in the Agenda view using the Idservico foreign key with Razor Asp.Net mvc
I have a view Index which lists the schedules. In this list the agenda attributes including a foreign key appear IDServico, however, the list appears only the index of IDServico and I need the…
-
0
votes0
answers85
viewsDoes not delete record from list and SQL database
I would like you to delete the desired record not only from the list but from the bank as well, how can I proceed? He’s going with the id "0" Instead of taking the id of the record I wish to delete.…
-
0
votes1
answer323
viewsHow to load viewmodel fields dynamically into Asp.net core mvc
I have a 1:N relationship between the Person and Contacts classes. In my Edit view, I receive a viewmodel containing a contact list. In my View, I’ve made a single for which you should scroll…
-
0
votes0
answers60
viewsCall PROC MVC to display the list of users who cannot register
Trying to call the PROC sp_UsuariosVariasTentativasCadastro_Result, that brings a list according to the form data. But nothing is happening. Someone can help me ? NOTE: I created all these "layers"…
-
0
votes1
answer1180
viewsCannot convert Implicitly
I’m getting the following error: Unable to convert from "Tclient" to "Easysistema.Models.Applicationclient" public class ClientManager<TClient> { private ApplicationDbContext _context; public…
-
0
votes1
answer175
viewsName property does not work using Razor Hiddenfor
I am creating several fields dynamically using Asp.net Razor and for this I am passing the index to a partial view and setting the name property of each field. Everything is working fine with all…
-
0
votes0
answers47
viewsProblems removing items from a List<Viewmodel> when Row is removed using Javascript
I have a contact list that is dynamically loaded using Razor and Javascript to remove lines and reorder field positions. The problem occurs when I click the delete log button and delete all contacts…
-
0
votes1
answer82
viewsRedirect to ASP.NET MVC login screen constantly
constantemnte while browsing the site the user is being redirected to the login screen. I myself keep browsing several screens by clicking on the menus and randomly the system goes to login. I have…
-
0
votes0
answers58
viewsUpdate of Telephone Array in the database
I’m trying to update information in my database where I have 1:N amid Clientes and Telefones, but I am not able to perform such update, because sometimes it will be necessary to remove a phone that…
-
0
votes0
answers108
viewsTwo Viewmodels in one View
I have a problem, let’s explain: I have a page called Index where I re-address all the clientes from my database in a table, in this table there is a delete button that opens a Modal de Confirmação…
-
0
votes1
answer234
viewsHow to Get Client-Side Data to the Server
Hello. I developed an application in . NET CORE and the access page will pick up the geolocation of the client with the coordinates of Longitude and Latitude. However, I made this code using…
-
0
votes1
answer252
viewsValidate Datepicker containing date only
I use Asp.Net Core MVC (Razor + Jquery Validate + Unobtrusive). I display in a Datepicker only the date part of a Datetime field through the following code in my Viewmodel: [Required(ErrorMessage =…
asp.net-mvc asp.net-mvc-5 validation jquery.validate unobtrusiveasked 6 years, 1 month ago Braytiner 176 -
0
votes0
answers82
viewsNumerical field error MVC Asp.Net
People I’m having trouble in Asp.NET MVC when I use numerical field I’m having error. Razor is like this @Html.EditorFor(model => model.AliqIpi, new { htmlAttributes = new { @class =…
-
0
votes1
answer643
viewsHow to call a javascript function that is in a separate cshtml file (.js)?
Hello, I have a page where the data of a DropDownList are the result of the selection of a DropDownList previous to this, I created a function with javascript and ajax to realize the filter,…
-
0
votes1
answer33
viewsHow to update the Index of a field using Javascript in Asp.net MVC
I’m creating fields dynamically based on a List. When I remove a field, I need to reorder them using javascript, but I am facing problems, because all fields are reordered Indexes, except those that…
javascript asp.net-mvc asp.net asp.net-mvc-5 javascript-eventsasked 6 years, 1 month ago Master JR 1,853 -
0
votes2
answers226
viewsHow to Insert a parameter from my system into an external URL
So, we have a website that when passing a user’s code, it shows the location of the same. Example of the URL:…
-
0
votes1
answer2001
viewsObject cannot be converted to dbnull in other types
Good afternoon gentlemen. I am making a user registration in the college work and when logging in this error appears. How can I solve? private Usuario Mapear(DataRow registro) { var usuario = new…
-
0
votes0
answers589
viewsPK and FK Conflict in SQL Server Database
I am facing a Primary Key and Foreign Key conflict problem in SQL Server 2017 Express. I am using ASP.NET with Entity Framework Code First (Migrations). The problem is that when I add a new Client…
-
0
votes0
answers31
viewsComponent switchery does not work on a Partialview - Asp.Net MVC
I am having problems with data-plugin switchery (Remark bootstrap component) that does not want to work in partialviews. The interesting thing is that if it stays inside a normal view, it works…
-
0
votes1
answer389
viewsWrite a Json string to the database c#
I am able to receive the data correctly, and being able to separate them correctly too, only problem is that I do not know how to use the values and be able to write in the database, could help me ?…
-
0
votes1
answer275
viewsDropdownlist with Selectlist Item
I am trying to create a Select List, but in case it is returning it to my view: Microsoft.AspNetCore.Mvc.Rendering.Selectlistitem so is not returning the Cargos that are in my database and here are…
c# asp.net asp.net-mvc-5 asp.net-core entity-framework-coreasked 5 years, 11 months ago Matheus 616 -
0
votes1
answer307
viewsCalling a Modal via Html.Actionlink
I have a screen that makes the user password exchange. This screen shows the user name and when clicking on the name, it is directed to the screen to exchange password. As I would make this call…
-
0
votes0
answers63
viewsWhat’s wrong with my Update?
Good morning. I’m a beginner and I’m having problems with my Update. I wonder what I’m doing wrong. public string Update(Usuario usuario) { var sql = new StringBuilder(); sql.Append("UPDATE TBUSU…
-
0
votes1
answer105
viewsUpdate Role of the ASP.NET Identity user
hello guys I am finding it difficult to update the user role when updating my data, my roles are being filled by a Viewbag in my get from my controller and I am retrieving the new ID from my…
c# asp.net-mvc asp.net-mvc-5 asp.net-web-api asp.net-coreasked 5 years, 11 months ago Thiago Ubiratan 353 -
0
votes1
answer571
viewsHow to load a Spinner into a Modal during Ajax (GET) - Asp.net requests
I have a Page Index with a Grid that lists CEPS. I am using "Modals" windows to Edit, Delete and Create a new Record. When I click on the Edit button, there is a delay of about 3 seconds for the…
-
0
votes2
answers158
viewsHow do I always return the same View, independent of Controller and Action?
I created a View calling for Manutencao that displays a maintenance page. And whenever the Index is called I display it. public class HomeController : Controller { public ActionResult Index() {…
-
0
votes1
answer42
viewsError trying to install Ntoastnotify package by Nuget
I’m trying to install the package: Ntoastnotify version 5.0.10 in my system: Asp.Net Core 2.1 But I’m getting the following messages: Severity Code Description Project File Line Suppression State…
-
0
votes1
answer28
viewsProblems when performing a MODEL POST with AJAX on ASP.NET CORE MVC
I’m having trouble doing a post of a complex template using AJAX on Asp.net. Modelhave some properties that represent other Models, but at the moment, I just need to initialize them with NULL. I…
-
0
votes0
answers183
viewsC# MVC 5 - Ajax - Run Two Actions
Good morning. I would like to run two Action, one that displays the result on the screen and the other that generates an excel file. The View that displays the results at its top has the search…
-
0
votes1
answer188
viewsHow to implement a text file export/import layer in DDD and how it will relate to the other layers
I’m basing myself on an Eduardo Pires project Here and I have some questions about implementing a unique layer for importing and exporting database information in csv, txt, xls, among others. For…
-
0
votes1
answer29
viewsHow to fill a Dropdownlist from another Dropdownlist
I need to know how to popular a Dropdownlist from another Dropdownlist. Example: I have a Dropdownlist called Team that takes information from my DB. When I select for example "Equipe1" I need that…
-
0
votes1
answer64
viewsAssociate Label in If
I have 3 DropDownList, take their values, multiple and display result. However, I do not want to display this information in numerical format, but rather a label, as well as mineDropDownList. They…
-
0
votes0
answers382
viewsMessage: The following constructor Parameters Did not have matching fixture data: Icompetitionservice competitionManager
I am getting the following error in my application Xunit, when using dependency injection: Message: The following constructor Parameters Did not have matching fixture data:Icompetitionservice…
-
0
votes0
answers142
viewsHow to return to previous View without losing data
I have a problem that I can’t solve, which is this. I have a screen that loads two simulated (each simulated has the questions and the radios Buttons that are the options). The simulated ones are…
-
0
votes0
answers25
viewsHow do I index a system’s pages to Google? (SEO)
I have a doubt, that I could find no answer anywhere, the ones I found left me somewhat confused. How to index the urls of my system in ASP.NET on google, for example a static site already has the…
-
0
votes1
answer116
viewsHow to find the user logged in to the Infra layer? (Using DDD with C# MVC EF)
I’m developing a feature for storing the history of screen record modifications. Example: I have a register of people, in this register of people, at each action performed (Insert, Edit, Delete) I…
-
0
votes1
answer33
viewsHow to improve code
I have the following method: public async Task<ActionResult> AlterarRequerimentoAsync(RequerimentoViewModel model) { if (ModelState.IsValid) { var projeto = await…
-
0
votes1
answer57
viewsError filling cascading combobox: Failed to load Resource: net::ERR_CONNECTION_RESET
I am trying to create a method to register a coefficient, this coefficient is linked to a table, which in turn belongs to a Concourse, the idea is to select the Concourse in the first combobox and…
-
0
votes1
answer122
viewsDatetime field is null when switching to controller
I have in my application a search form using Ajaxbeginform. In the same I own a data field (Datetime), and in which I am using the bootstrap datepicker. My form looks like this: @using…
-
0
votes2
answers74
viewsForeach repeating values when running sqlquery
While executing my foreach, he is repeating my first result in sql. For example: In doing select * from tbNome he returns Gabriel, Rafael When executing the sqlquery, he list Gabriel, Gabriel…
-
0
votes0
answers86
viewsHow to get back Task<int> of a function (Mediatr) - Asp.net Core MVC
How do I get the entire value returned through a Task? I have tried several ways, as I have seen in forums on the net, but I could not. I tried to use var customerId =…
-
0
votes1
answer45
viewsList Null Post Ajax Asp.NET MVC 5
I’m trying to post a LIST via ajax, only the controller is always getting null. Requisition code: var Componentes = [{ Nome: "Teste1" }, {Nome: "Teste2"}]; $.ajax({ type: "post", url:…
-
0
votes1
answer102
viewsProblems in Object Reference not defined for an object instance
I have a problem with the result of the method SaveChanges(). I am trying to save a record, and it is persisted in the database, however the application is returning the message from exception:…
-
0
votes1
answer133
viewsHow to declare an image in the ASP.NET Core Model Class?
I’m following this tutorial from Microsoft:…
asp.net asp.net-mvc-5 asp.net-core entity-framework-6 entity-framework-coreasked 4 years, 10 months ago Iori Yagami 13 -
0
votes1
answer46
viewsHow to throw controller errors and capture them in an Ajax - Asp.net Core MVC request
I’m using AJAX to make a request and the return is a Partialviewresult. In the request, I am passing the personal model. Someone knows how to help me? CONTROLLER: [HttpPost]…
-
0
votes2
answers49
viewsHow to make the custom select of the screen "Suppliers" search information (Company name) in the table "Company"
I am developing an Asp.Net application using MVC 5. I have created one select on the Vendors screen and I would like to know how I can get the information from my bank and show them in this custom.…
-
0
votes2
answers210
viewsError trying to access ASP NET MVC page C#: "HTTP 404. The Resource you are Looking for (or one of its dependencies) could have been Removed"
Hey, guys, a problem I can’t seem to solve. My project is ASP NET MVC5 with C#. I went to create another page in my project and simply when I run it is not recognized. I did the same way I always…
c# asp.net-mvc asp.net asp.net-mvc-5 visual-studioasked 4 years, 2 months ago Rafaela Marraschi 123 -
0
votes0
answers38
viewsWhy is my application logging out after saving a record? - Asp.net MVC and Identity
When I first created my app (Asp.net core MVC) Identity was installed automatically. All login features, user records, among others, were created automatically. When I log in using my email,…
asp.net-mvc asp.net-mvc-5 asp.net-identity identity-serverasked 4 years, 7 months ago Master JR 1,853 -
0
votes0
answers29
viewsValidation for Dropdownlist in ASP.NET MVC
I’m doing a project, I was doing a Dropdownlist that takes the database data and shows the user. To some extent everything went well, but it lacks a part of treatment, or a validation, because every…