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
answers68
viewsActionresult Create error
I’m with a exception, in the method of creating an object with a foreign key, db.SaveChanges() with the following message: Dbupdateexception was unhandled by user code. [HttpPost]…
-
0
votes0
answers50
viewsError in connection to oracle database after doing Publish on Azure with visual studio
I am developing a project in Asp.net with Oracle data base 12c. The connection to the database locally works. It does all CRUD functions. I am also using the services of Azure (project requirement),…
-
0
votes1
answer49
viewsHow to create List of a class within another class and not be mapped in Entity Frameworks
I have a class called Chamber [Table("Camara")] public class Camara { [Key] public int CamaraId { get; set; } [Display(Name = "Nome")] [Required(ErrorMessage = "O Campo {0} é requirido!")]…
-
0
votes1
answer28
viewsHow to make one or more field within the screen run javascript function
I have a javascript function that should be executed when any of the two fields are made any kind of change. At first only the field #Dating when a change is performed executes the script but I want…
-
0
votes1
answer64
viewsCheckbox does not load returned data in JSON
I’m having trouble loading a checkbox (<select>) using C# MVC with Json. The method returns the complete list with objects, but does not click on the checkbox. Man Controller: public…
-
0
votes1
answer27
viewsReceive integer value in field view
Guys, I need some help from you. In my system I created a modal with data viewing pulling from the database. I need one of these data to display only the integer numbers, as an example in the photo.…
-
0
votes1
answer1191
viewsMask with ASP.NET Core MVC
I’m doing a job for college with Asp.net core MVC, and I’m using the Entity to generate the view and queries in BD. I need to put masks in the fields such as CNPJ. I was able to search on Google how…
-
0
votes1
answer81
viewsVery slow query to export in excel
I created a method to export a few columns to xls and it is very slow the process, it takes about one minute to do the whole process. public void Download(string datainicio, string datafinal, int?…
-
0
votes1
answer44
viewsError in expression
Can anyone help me with the following mistake? Here below is my code. I am trying to fix this error, but I did not succeed. public IEnumerable<Dia1> GetPendenciasByUser(int centroId) { var…
-
0
votes1
answer53
viewsSource code for Helpers
Helpers source codes such as Textboxfor are available somewhere? I’ve found customizations like this: public static System.Web.Mvc.MvcHtmlString DtxTextBoxFor<TModel, TValue> (this…
-
0
votes1
answer123
viewsScripts stop when I open Modal in a Partial View for the second time
My first question here. I am developing my first system using Asp.Net MVC. In a View I call a Modal whose modal-content is a Partialview containing scripts (jQuery). When I open Modal for the first…
-
0
votes1
answer606
viewsViewbag and Viewdata Doubt
I’m starting my career in development, and in the company project here, I found a ViewData being used, and for my researches I can not update it in a ActionResult in the controller. I ended up…
-
0
votes1
answer35
viewsASP.NET RAZOR - Project WEBSITE running on IIS (Approval or Production) does not include TAG HEAD
I have a problem in my WEB project , which when running by an IIS from a server, the tag html HEAD does not appear closed and when executed locally it appears correctly. Detail, when inspecting…
-
0
votes1
answer352
viewsField without REQUIRED is being mandatory, why?
using ExemploValidacao.Models; using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.Net.Mail; using System.Web; using System.Web.Mvc;…
asp.net-mvcasked 6 years, 8 months ago HeyJoe 819 -
0
votes1
answer271
viewsSystem.Collections.Generic.Ienumerable
Help, guys! I’ve tried to do everything, already includes "using System.Linq"and nothing. Anyone knows? Medicoscontroller using System; using System.Collections.Generic; using System.Linq; using…
-
0
votes1
answer56
viewsPass Httppostfilebase as parameter in the API method
I have an Api that makes employee registration and also a photo, in the parameter I pass the object and a type htttppostfilebase, but when sending to api in my debug is not even hitting the method,…
-
0
votes0
answers93
viewsShow Image in Datatable Asp.net MVC
I’m having trouble displaying an image in my application’s datatable. I get the name of the image but it does not display. "columns": [ { "data": "Id", "name": "Id", "autoWidth": true }, { "data":…
-
0
votes1
answer110
viewsRequest sent more than once when selecting a form field
When I select a specific field from a form, I trigger a request to load some essential information to complete the form, only when selecting a form field it fires 3, 4 requests and this causes my…
-
0
votes1
answer184
viewsEdit/Update - ASP.NET MVC
Good afternoon! I’m trying to edit from "João Torres" to "João Torres Moreira", but appears the error message below. Repository update, insert, or delete instruction affected an unexpected number of…
asp.net-mvcasked 6 years, 7 months ago Joao Torres Moreira 55 -
0
votes0
answers147
viewsProblems returning a Iqueryable<> list to convert it with Automapper
I have a function that returns me a list of people with their personal/legal relationships. I own a Personal Viewmodel that is already mapped in the Autommapper layer... When I call the Getjoinall()…
-
0
votes0
answers71
viewsLogin with email and not with username in Asp net mvc, how to resolve?
Well, I have an application being developed in Asp net mvc, in the same the user logs in and after logging in is displayed the message " Hello so so so so so welcome", for that I had to change some…
asp.net-mvcasked 6 years, 7 months ago WPfan 786 -
0
votes1
answer46
viewsSet login page by user profile
Good afternoon guys, I need a little help from you. I have two access profiles to my system. "Master-IT" and "Developer" This is my system login controller [HttpPost] public ActionResult…
-
0
votes0
answers385
viewsHow to make Table with two foreach close <tr> </tr> Asp.Net MVC
I need to make a table that for each row I have the information as shown below See that in Lot 1 until City the data does not repeat at each foreach and only from the column Species the data…
-
0
votes0
answers32
viewsController variable is null on ajax get
I have a List of objects that is instantiated when the view is created, when a value in the dropdownlist is selected, use ajax to make a request to verify which of the objects inside that List is…
-
0
votes0
answers247
viewsModelsatate.Isvalid always false
When trying to save my model in the database, when trying to validate Modelstate.Isvalid, it is always false as if it had fields pending. I know that it is due to the Dropdownlist that returns me a…
asp.net-mvcasked 6 years, 7 months ago Rafael Meireles Elias 1 -
0
votes2
answers312
viewsMetodo Post Angular
Hello, I am developing an application using as Backend ASP.NET C#, and with front Angular5! I’m doing a post method for the first time and it’s not flowing well! In Backend I have a method as…
-
0
votes1
answer114
viewsMessage appears when selecting value in a dropdownlist
I created a dropdownlist in Asp.net linked to a database. Now I want a message to appear as soon as one of the values of db is selected. (Ex: A dropdownlist with three values "A", "B", "C". When I…
-
0
votes2
answers228
viewsAsp.Net MVC - Selecting item from a Dropdownlist reflects the same selection in another Dropdownlist that contains the same selection items
I have 02 Dropdownlist fields that have the same items to be selected, this is: Camera 1 Camera 2 Camera 3 Camera 4 Camera 5 Camera 6 Summarizing in great part of the registrations that will be…
-
0
votes0
answers490
viewsEmail Confirmation in C#!
I made this form that the user when registering should receive an email in which will have a link to confirm your email by clicking on the link, so the way I did it is not receiving the confirmation…
-
0
votes1
answer32
viewsWhy does my Endereco model return null after the postback?
Why did my model Addressee returns null after the postback?: Model: public class Paciente { public Paciente() { Endereco = new List<Endereco>(); } [Key] public int PacienteID { get; set; }…
-
0
votes1
answer211
viewsCascade and Composite Dropdownlist MVC
I have one question I have 1 User class and composed by other classes Gender, Course and Semester Ex public int Id { get; set; } public string Nome { get; set; } public Genero Sexo { get; set; } =…
-
0
votes0
answers340
viewsConfigure my Datatable (Bootstrap) headers padding using Javascript and CSS
I need to configure the padding of my Datatable (Bootstrap) headers through Javascript and CSS, because the arrows are getting too close to the header titles and getting cluttered when the columns…
-
0
votes1
answer102
viewsEvent click javascript does not call the action - Asp.net Core
I created a modal block to display my View Create. When you click on btnNovo, a javascript event should call my Action Create to return a blank view and click inside the modal... Only the modal is…
-
0
votes0
answers58
viewsZxing Colorful . net
I need to create a color qrcode using zxing.net however I can’t and I can’t find 1 tutorial on the internet even searching and trying for days, Does anyone have any idea how to develop 1 color…
-
0
votes1
answer26
viewsCalling other data from an entity
I created a database entity and a dropdownlist. When I click on a list item, I want to call the other data. How do I ?? Follows code public ActionResult dbExample() { copaDBEntities entity = new…
-
0
votes0
answers36
viewsFirst Field is null in Each JQUERY
The first fields are appearing null when I step into the controller follows the code HTML <div id="divItensServicos" class="price-box collapse"> <h3>Itens de Serviços</h3> <div…
-
0
votes0
answers27
viewsBring related data in a table
I need to bring the sessions of a certain film, but in case there is more than one session in the same cinema, bring only one data and the two times side by side. Does anyone have any way? It’s my…
-
0
votes0
answers370
viewsMVC Upload Image and send the database
Good evening I’m making an online shop for a discipline and I was wondering if someone could help me create the image upload to the Database. The purpose is to add in the admin page and appear in…
-
0
votes1
answer83
viewsLoad a window only once after reloading the site in Asp.net C#
Having this window when accessing a website for the first time, how do I only appear once even after reloading the website or the user goes back to the home page and does not reappear this?…
-
0
votes1
answer217
viewsGet or return a variable to the angular
I have a method where I do a certain validation and depending on the scenario, I need to return only an alert and continue with the request or a possible Badrequest also returning a message. I…
-
0
votes2
answers250
viewsHow to sort and list only 5 items from a list?
You see, I am developing the Dashboard of a web system, in one of the filters I should list the 5 main customers and sort them by higher value of the sums of total of issued bills. I’m already able…
-
0
votes2
answers910
viewsCall a method every time a Controller is triggered Asp.net mvc
In my project I have a method that creates a menu on the layout page "_Layout.cshtml", for example, in my control HomeController.cs this method remains, and in ActionResult Index() I call this…
-
0
votes1
answer156
viewsHow do this FOR (in C#) list only the first five items?
I have an orderly list, which I need to display only the first 5 items, not all bank records, so I’m not getting it. Here’s my code as is: public class DashboardController : Controller { private…
-
0
votes0
answers236
viewsPassing parameters between Views and Listing values
Greetings, I have a View Index passing values from column "id" to another View Index, as code below: <a data-bind="attr: {href: url()}" target="_blank"…
asp.net-mvcasked 6 years, 5 months ago DP WS Receptivo 77 -
0
votes1
answer53
viewsSave form Razor
How can I make my form not to sumbit the same form several times. I’m having this problem because some users are clicking save several times, not waiting for the screen update, so it is saving…
-
0
votes1
answer24
viewsError deleting - 1.9 Application Termination: Operation Delete
I am not able to remove an ID when I click... Error message appears: System.Invalidoperationexception: ː Sequence contains no Elements' Follow my code below: Institucaocontroller: using…
-
0
votes0
answers49
viewsGood Practices Asp.net Core MVC: Creating a Dropdown for a current record to be used globally across the system
I have a question: I am creating a backward system in Asp.net core mvc and in my _Layout.cshtml I need to create and load a dropdown listing all the AFFILIATES of the system so that the user selects…
-
0
votes1
answer129
viewsGet Hidden value . net core
Good morning I have this Hidden that gets the value correctly: <input type="hidden" id="idHorario"/> But I need to get the Hidden in the code, how can I proceed? HorariosItens = await…
-
0
votes0
answers21
viewshow to define routes in MVC
good night.. I have the following Controller: Homcontroller with Action: Login By clicking the enter button my URL is as follows: http://localhost:58379/home/login I would like the URL not to be…
-
0
votes1
answer232
viewsList Database result in checkbox with AJAX and Jquery
I have a function that searches the bank for an entity list and shows in select. However, I need this same list to be shown at checkbox where the user can check more than one option. How to show…