Most voted "asp.net-mvc" questions
ASP.NET MVC is an open-source Microsoft framework that implements the Model View Controller architecture standards for web development. Based on ASP.NET, it allows software developers to build web applications following the Model View Controller architecture standards, featuring a variety of features following recent trends.
Learn more…3,385 questions
Sort by count of
-
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
answer243
viewsPass value from a select to Html.Beginforms - Asp . Net
I have that element <select>: <select id="status" class="form-control form-control-sm" name="arquivo" > @{ foreach (string valor in ViewBag.ListaArquivos) { <option…
-
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
answer81
viewsExchange Html.Action() for an Ajax request
I have a method that returns a ActionResult called through a Html.Action() directly on View using Razor. This method is used to render a ComboBox of devExpress with the data I send a command SQL at…
-
0
votes1
answer112
viewsCreate new directory according to string
I have a function that saves an image in a default directory, for all companies, and I tried to change this to save in a directory according to this string companyFolderwhich I have created. Yet you…
-
0
votes0
answers304
viewsMysqlexception . NET Core 2.1: Unknown column 'xxxx' in 'field list'
I have a bizarre mistake I’d like to share with you. I’m using Visual Studio 2017 and creating an MVC application with NET Core 2.1, based on a Mysql database and tables that already existed before.…
-
0
votes0
answers301
viewsPool of ASP.net MVC apps stopping alone
I have an app ASP.NET MVC that is rotating on top of the IIS in version 10.0. When there are multiple simultaneous connections (3~5 connections) it simply to the application pool presenting the…
-
0
votes1
answer47
viewsFailure return on Submit
I have a Ubmit, which before I perform this function: $('#modelEditar').submit(function (e) { var cancelada = $("#Cancelada").val(); if (cancelada == "False") { e.preventDefault(); var id =…
-
0
votes0
answers82
viewsValidation with Modelstate
I have a web application in . NET Framework 4.6.1 with a method similar to the one shown below: public class MeuControladorController : ApiController { public IHttpActionResult…
-
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
votes1
answer139
viewsUnit tests with Nunit in function with Jsonresult type return
I’m trying to do unit testing in the following function (there are more ifs, but I believe this is enough to illustrate), using Nunit. The problem is that I am unable to treat the return of the…
-
0
votes1
answer63
viewsEntity Framework (Populating tables)
What is wrong with my project? When I try to give an Update-Database error message appears (The underlying provider failed on Open). When I remove the items I want to add, for example,…
-
0
votes1
answer238
viewsProblem with Onkeypress and Onenterkey
I have a problem, I need to get the value typed in a field, I thought to use OnKeyPress calling the function key_press as follows: var str; var keycode; function key_press(e) { var event = e.event,…
-
0
votes1
answer830
viewsError Mapping types. Mapping types: Icollection`1 -> List`1
I’m having a problem converting a List for ViewModel, using the ToListViewModel. Faturacontroller.Cs FaturaViewModel faturaViewModel = new FaturaViewModel(); faturaViewModel.mensagens = new…
-
0
votes1
answer105
viewsAutocomplete not working - Asp . net MVC
Good morning guys, I’m having trouble implementing a field with autocomplete in an Asp . Net MVC application. The problem is this, using an Ajax I can go to my controller and search for results of…
-
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
answer95
viewsHow to send an "Email Marketing" in ASP . NET?
At first: I am sending an email using the standard ASP . NET service as code below public class SendMail { public bool SendEmail(MailModel mail, string subject, string body) { try { string…
-
0
votes1
answer126
viewsHow to convert from List<> to Ilist<> using Automapper?
I need to convert a List to Ilist with automapper knowing that both are in different classes and one of them has a constructor. Is that possible? I’m using the Automapper 6.2.2. public class Pessoa…
-
0
votes1
answer185
viewsController receiving null parameters
//Controller [HttpPost] public ActionResult EditarConfSist(ConfSistMOD confSist) { try { var repositorio = new ConfSistREP(); repositorio.EditarConfSist(confSist); // gerar o log logar = new…
-
0
votes1
answer281
viewsError while trying to popular a List
I’m trying to create a table with Union, I made a class to popular on ViewModel, in this way: public class ListVencimentos { public int Id { get; set; } public DateTime Data { get; set; } public…
-
0
votes0
answers43
viewsError making a request to an external API
I am trying to make a request to an external API but in the console appears the following error: Code in Jquery: $("#Compilar").click(function () { var codigo = $("#CodigoText").val(); var clientId…
-
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
votes1
answer110
viewsPagseguro Session with Asp.Net MVC?
I am trying to get the Pagseguro session using the Asp.Net MVC Webclient but always launches an error exception that I am unable to solve. Webclient [HttpPost] public JsonResult getSessaoPagSeguro()…
asp.net-mvcasked 5 years, 8 months ago FernandoPaiva 1,562 -
0
votes1
answer36
viewsAspnet Core - Failed to display date in form
I’m making a system to exercise aspnet core. In the system I have a record of Transaction, that is already working correctly, and at this time I am making an option to edit a transaction that was…
-
0
votes0
answers86
viewsDisable Identity Entity Framework temporarily at runtime
I need to synchronize 2 databases, One stays on the local machine and one on the server, I get the data I need by Api via Json, And it returns me the model with the data I need to insert.. However…
-
0
votes2
answers46
viewsLog datagridview data into a table in the database
Good afternoon, you guys! I have a problem with doing a data insertion presented to my datagridview. I have a table called Events, and it contains all my records, I created another table with the…
-
0
votes1
answer44
viewsEnter a screen with the dropdown option already selected
I got this dropdown <div class="form-group"> @Html.Label("Grupo de Desconto", htmlAttributes: new { @class = "control-label col-md-2" }) <div class="col-md-10">…
-
0
votes2
answers144
viewsClear html content with jquery not working
I have this jquery <script type="text/javascript"> $(document).ready(function () { $("#GrupoDescontos").change(function () { $.ajax ({ url: '' + $(this).val(), type: 'GET', success: function…
-
0
votes1
answer33
viewsHow to list values using ng-repeat using Angularjs and Jsonresult ASP.NET MVC?
Good Friends! I am working on a MVC application that returns JSON to an Angularjs controller, it turns out that these values are unit values and lists. And when rendering in the view, only unit…
-
0
votes0
answers28
viewsDo not cache a View using Asp.NET
I have a popup that renders another View using the RenderPartial(). @Html.DevExpress().PopupControl( settings => { settings.Name = "pcModalMode"; settings.Width = 550; settings.Height = 420;…
-
0
votes1
answer354
viewsModal does not rise when called by jquery
After a few mistakes, I managed to make jquery work. Now I need to call Modal from inside jquery in the change of a Dropdownlist. Below my jquery. $(document).ready(function() {…
-
0
votes0
answers88
viewsWhen calling Modal, screen is displayed and disappears and the execution continues
The idea of Modal is a screen that is displayed and the screen below is disabled and the execution of the program only follows after closing the Modal. With me it looks like this. Modal is displayed…
-
0
votes1
answer51
viewsBring model value to Textarea
I have the following page cshtml @using SoftluxWebCore.ViewModels.Tabelas @model SoftluxWebCore.ViewModels.Tabelas.MensagemViewModel <!-- Link to CSS --> <link href="~/css/Geral/create.css"…
-
0
votes1
answer54
viewsHow to check and convert Ienumerable values from a database query?
I have one that returns a table in Ienumerable and I have a certain column that returns values "A" for Active, "C" for Canceled and so on. I would like to convert these values to the correct one…
-
0
votes1
answer72
viewsTreat and Save List in Asp.Net MVC Controller
I have a Customer Class, which uses 1 or several systems. public class ClienteEmpresa : Pessoa { public virtual ICollection<TipoDeSistemas> TipoDeSistemas { get; set; } } In my Action Get…
-
0
votes2
answers327
viewsReceive List in View. Asp.Net Mvc
I’m having trouble with Action Edit. I have a class called Clientefirm this class has a System collection. For Example: The Customer X uses the systems To, C and F. My problem is how to present…
-
0
votes1
answer119
viewsAdd multiple items in a single Session
That way I add an item to session var item = new FornecedorTipoFrete() { TipoFreteId = id, TipoFrete = new TipoFrete() { Descricao = tipofrete }, FornecedorId = (fornecedorID) };…
-
0
votes1
answer22
viewsProblems with select command of Line
The query worked she has 2 questions randomly with the 5 options each. The problem is that my select loads the view described below: public class QuestaoOpcaoModel { public int QuestaoId { get; set;…
-
0
votes0
answers45
viewsCount number of Users
I have a Client class, and a Systems Class. A customer has one or more systems: public class ClienteEmpresa : Pessoa { public virtual ICollection<TipoDeSistemas> TipoDeSistemas { get; set; } }…
-
0
votes1
answer85
viewsI cannot call an asynchronous method in the view
I’m trying to call this method asynchronous in the view but I can’t. private async Task LogOff() { RedirectToAction("Index", "Home"); await HttpContext.SignOutAsync(); } This is one of the ways I’m…
-
0
votes1
answer37
viewsModels and contexts do not appear in the Scaffold box
installed VS community 2019, and fiddling with an old project, I noticed that the classes don’t get greener as having reference, and I can’t access them by right clicking and going into…
-
0
votes1
answer235
viewsDataannotations With Datetime
I’d like some help. Following model: [Display(Name = "Data Aquisição")] [DataType(DataType.Date)] [DisplayFormat(DataFormatString = "{0:dd/MM/yyyy}", ApplyFormatInEditMode = false)] public DateTime…
-
0
votes1
answer168
viewsChange View of Table
There is the possibility that I can create a menu, where I can choose which fields to show in my table? for example, I have a class with the following attributes: Name, Colour, Dating, Cpf, Rg, Id.…
-
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
answer186
viewsAspnet Mvc Automated Routine
I have the class Clientefirm and the class Archivists one client has a list of tax files (a maximum of 12 per year, one per month) and one Archivist has a Client. public class ArquivosFiscais {…
-
0
votes0
answers44
viewsError 500 (Internal Server Error) Get
ERROR GET http://localhost:54446/Tasks/Listrintegrants? team=1 500 (Internal Server Error) HTML @using (Html.BeginForm()) { <div class="form-horizontal"> <h4>TarefaViewModel</h4>…
-
0
votes1
answer229
viewsconnectionString Local Network Asp.Net MVC SQL SERVER
I am trying to connect a bank in my application, which is networked, so I have put the following path: <connectionStrings> <add name="smc" connectionString="Data Source=192.168.0.29;…
-
0
votes0
answers45
viewssyntax pass value via post Razor Asp.net mvc
I’m trying to make a method to change via POST in my code and is giving syntax error, I do as follows: @Ajax.ActionLink(" ", "Usuario", new { item.CodigoUsuario }, new AjaxOptions { UpdateTargetId =…
-
0
votes1
answer28
viewsI am doing a search system in my movie view and gave an error regarding the Web request
(I decided to make another post, as advice of another user) In my Movies view there is a list of all the movies you have in the database and I added um botão, uma caixa de texto e 2 radio…