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
-
1
votes1
answer1419
viewsSending notifications from Pagseguro Sandbox to local address (C# ASP.NET MVC)
I’m doing the integration of Pagseguro in an ASP.NET environment, and everything was going well until I got to the Pagseguro notifications part. As you can see in the image below, I have set the…
-
1
votes1
answer601
viewsUpdate DIV with Ajax Asp.Net C#
I’m setting up a Dashboard for tracking tickets, in it there are basically two things, 4 fields and 1 chart. I would like to update them periodically, tried with <meta http-equiv="refresh"…
-
1
votes1
answer294
viewsController receiving parameter array as null
I’m making an AJAX request, but I can’t pass array... My controller is like this: [Route("imoveis/BuscaDados/Json/Listas/ListaQuartos")] public JsonResult ListaQuartos(int idEstado, int idCidade,…
-
1
votes1
answer1544
viewsLog out and redirect user to ASP NET MVC login screen / C#
I am looking for a way to terminate my session and redirect the user to the login screen when my system der Timeout. I tried to use Session.Abandon() according to some examples I researched. But I…
-
1
votes1
answer931
views(ASP.NET MVC) Create Session variable
I have an ASP.NET MVC application that is published on two IIS servers (homologation and production); In this application, I use the Session variable to save the user’s login in a part of it,…
-
1
votes1
answer3199
viewsHow to return a C# error with Json Result?
I am starting now with the language C#, and I came across the following task on a system, I must do an error treatment and return this in Json Result, the returned data should be collected and sent…
-
1
votes1
answer269
viewsHow to insert/save string RTF - Aspxrichedit
In my application, I search the database for a string that contains RTF and need to load it into Aspxrichedit. And when necessary, save Aspxrichedit content to an RTF string to store in the…
-
1
votes1
answer383
viewsAssociate Identity Applicationuser to my Personal Class
My Asp.Net MVC system uses Identity in its default form, with a few simple customizations. I also have a table of Individuals (which inherits some information from People, but I don’t think this is…
-
1
votes1
answer355
viewsHow to enable Migrations to Identity in Asp.net MVC
I need to decouple Identity from my Asp.net core MVC layer and play it for another crosscutting layer of my DDD project. Based on Eduardo Pires' Equinox project, I was able to do it, but I’m finding…
-
1
votes2
answers555
viewsDo not update a particular EF Asp.net mvc field
I have a table that every time I create a new registration has the field Datacadastro, however when I want to edit I do not want to change the date that was registered and only changes the other…
-
1
votes0
answers133
viewsEntity Code First Migrations does not find Microsoft.EntityFrameworkCore.Design
Hello, I am working on a dotnet 4.5.1 project using Entityframework with Codefirst Migrations, I have added 1 new field to an entity and I am trying to add a new Migration, but the following error…
c# asp.net-mvc .net code-first entity-framework-coreasked 6 years, 9 months ago David oliveira barbosa 11 -
1
votes1
answer203
viewsSelect all items with same Id in the same table
Very well, I will try to be as clear as possible. I have the stock table where will have there several products -> Productoid and its Quantity. In the same table the product can be repeated with…
-
1
votes2
answers441
viewsError when connecting to oracle database using web programming on . net
When making attempts to connect to the bank I obtained the error according to the attached image. My application is web in . net, visual studio 2010, oracle sql database developed 3.1.07. My code…
-
1
votes0
answers64
viewsError while compiling a web application
How to solve this problem? I have an application in dot.net and when compiling this message appears. I didn’t want to let this directory be default. How can I fix it? Would anyone have any idea what…
-
1
votes0
answers34
viewsTemplate Misaligned Bootswatch Template
I started using the Yeti template of bootswatch and there were 3 problems, my textarea misaligned from my other fields, besides the spaces between the fields increase a lot. Screen print in the…
-
1
votes1
answer72
viewsMigrations Asp Net MVC
I did a project first feeding my application ASP.Net MVC by an SQL Server database that I have uploaded to the web.config file (connectionString). Then, following some courses I did, I started using…
-
1
votes1
answer327
viewsHow to clear a @Html.Textboxfor using Javascript?
I am trying to clear the value entered in the field of TextBoxFor the following form just after Submit. @BHS_Treinamento.WebApi.Models.Curso @{ ViewBag.Title = "Cadastrar"; }…
-
1
votes2
answers120
viewsLambda expression to return a Person in the repository - DDD and Aspnet.Core
I have a table Person who has one-to-one relationship with the tables PessoaFisica and PessoaJuridica. When I pass the id, it has to check me if nature is physical or legal and bring me the person +…
-
1
votes1
answer109
viewsDoubt about modularization in MVC Application
Friends, I always try to focus on good programming practices, and one practice that most confuses me is the Modularization. For example, I have the method below that receives data from an API and…
-
1
votes1
answer217
viewsComparison of Dates c#
My question is this:. I need to display 2 status on a page that would be Primeiro and Alterado, where the first sql line with the date of 2018-03-05 10:24:55.787 get the status Primeiro and the…
-
1
votes1
answer659
viewsPass view bag value to view
I’m trying to pass value from a view bag to the view create. Controller public ActionResult Create() { ViewBag.BanhoTosaId = new SelectList(db.BanhoTosas, "BanhoTosaId", "Tipo"); if…
-
1
votes2
answers925
viewsCurrent Date in @Html.Editorfor() Asp.Net MVC
Friend want the field come to standard already filled without the need of the user to put the date How to put current date in the default field @Html.EditorFor(model => model.DataAbate, new {…
asp.net-mvcasked 6 years, 8 months ago Cyberlacs 935 -
1
votes1
answer38
viewsGet Method with Customizable Where
I made a WebAPI (ASPNET with EF6) with verb support Get(), Post() and Delete(). At some point, I need to access certain values that are not returned by default by verbs, for example: The Order…
-
1
votes2
answers215
viewsIs it possible to have Identityserver4 and Authorization authentication in the API separately?
I recently asked a question in stackoverflow in English, but I may have expressed myself badly and I did not get the answer I wanted. Link in English. I have 3 different applications: Identityserver…
asp.net-mvc asp.net asp.net-web-api asp.net-core identity-serverasked 6 years, 8 months ago Raul Medeiros 152 -
1
votes0
answers38
viewsAzure and SQL Server MV Configuration
I need to develop a system for a medical clinic and this system will be accessed by 2 Receptionist and 2 Doctors. Initially the System is not complex but tends to grow as the Clinic will hire more…
-
1
votes0
answers92
viewsASP.NET Core NPM and webpack/Gulp
I created a project in Asp.net core using the Empty template (dotnet new web). For what I searched, to add packages like Bootstrap or jquery, we have to use NPM, which is basically to add the…
-
1
votes1
answer329
viewsAjax in MVC - Select
I’m having a problem loading the fields select in my project. Mine Forms are all done with Razor and only the select’s(combobox) I charge by ajax. Problem: When I start the form the ajax event to…
-
1
votes1
answer61
viewsTwo actions for the same View
I have these two action: public ActionResult Lista(int PessoaId, string Nome, string Twitter) { Pessoa p = new Pessoa(); p.PessoaId = PessoaId; p.Nome = Nome; p.Twitter = Twitter; return View(p); }…
-
1
votes1
answer89
viewsError doing counter via c#
I’m trying to do a pendant counter to my system, only it’s giving error, at the time of calculating, someone could help me? Error in . Count as you can see in the picture below. My Controller public…
-
1
votes2
answers339
viewsReturn of a View List to the Controller - Asp.Net Core
I have a viewmodel called Profile, in this viewmodel there is a Itensprofile List property and a string - title. public class PerfilViewModel { [Key] [DisplayName("Código")] public int Id { get;…
-
1
votes1
answer392
viewsSimpleinjector: The Configuration is invalid. The type is directly or Indirectly Depending on itself
I have the following problem when applying the Simpleinjector container in a simple application: The configuration is invalid. The type BookAppService is directly or indirectly depending on itself.…
c# asp.net-mvc dependency-injection ioc simple-injectorasked 6 years, 7 months ago Matheus Daumas 37 -
1
votes1
answer440
viewsValidation Message - ASP.NET MVC
Hello, I’m trying to get the message "validation" in ASP.NET in my project 'Cademeumedico' by the Web Development booklet with ASP.NET... However, it is not appearing as it should appear below. Mine…
-
1
votes1
answer208
viewsAdjust the alignment of the dropdownlist in a Bootstrap navbar
I don’t know if I’m doing this correctly, but I need to create a dropdown list on my navbar to show a list of branches that will come from the database. The problem is that when I insert it, it is…
-
1
votes1
answer82
viewsHow to change the welcome message when logging in!
i am developing an application in ASP.NET MVC, by default it already comes with a predefined template, however when logging in the application is displayed the message "Hello [email protected]…
-
1
votes1
answer2105
viewsHow to publish a site on Locaweb with an application made in ASP.NET MVC?
I have an application made in ASP.NET MVC, I want to publish in the company "Locaweb", see the following image: Follows error: An application error occurred on the server. The Current custom error…
asp.net-mvcasked 6 years, 7 months ago Matheus Miranda 5,375 -
1
votes1
answer169
viewsPartialview not clicking on the default of Select2
I’m having a problem when I call my Partialview, it loads all the data in the View but not in the right format (layout) of Select2, in case when clicking the input appears the data, is currently…
-
1
votes1
answer895
viewsHow to group buttons inside a column into a table so that they do not change when the column is adjusted
I have a table that has 4 action buttons inside a cell of a column. When the names start to get larger in character, the table starts to auto-adjust and in the Actions column, the 4 buttons are…
-
1
votes1
answer340
viewsHow to get a list of JS objects in Controller C# MVC?
I have an object with a list that will return me 3 or more items. I pass this object like this: var jsonObjs = JSON.stringify(arrayObj); alert(jsonObjs); CarregaNotas(jsonObjs); function…
-
1
votes0
answers111
viewsQuery the database in C# mvc + Intity
I am trying to display the result of my query in the view. However the value DESC_DESC_ORIGEM is empty. Controller using System; using System.Collections.Generic; using System.Linq; using…
asp.net-mvcasked 6 years, 6 months ago tatugf 11 -
1
votes1
answer517
viewsRoute.config of website in c# Asp.net
I’m building a website. But there’s one issue I can’t resolve. I have a Home Controller, where I have all the Views of the site. For example, I enter and when I click one of the images to go to…
-
1
votes1
answer30
viewsUndefined object reference for an instance - Null foreign key
Gentlemen(s), I have a relationship between two tables, Employee and Documents (1 : N) In my system there are two steps: 1° - The receptionist registers with basic information a document that…
asp.net-mvcasked 6 years, 6 months ago Pedro Baraldini 31 -
1
votes1
answer441
viewsIOC - No constructor without parameters has been defined for this object
I’m doing a project and they’re layered apart, I call it DDD. But I’m making the following mistake: No constructor without parameters has been defined for this object. I’m using Ioc, follow below as…
-
1
votes0
answers179
viewsNull incoming id in Asp.Net MVC controller action
I have a list of requests(Vr), in this list I created a button to finalize this request(Open Mv). When I click this button, I am redirected to my Low view, which has its own attributes, plus the…
-
1
votes0
answers33
viewsChange Password on first access using Identity Asp Net Error sending Email
I’m having a problem implementing a feature. The idea is: Make the User change password at first access(Since the user is created by someone else). How I’m using the Identity, I took logic of the…
-
1
votes1
answer188
viewsError while initializing database on server in Asp Net Mvc!
I have a finished application developed in C# using Asp Net MVC. On my local server the application connects to the database that is on the server of the company that I work, so when putting the…
-
1
votes0
answers62
viewsConvert.Todatetime error
I have the following code: public JsonResult salvaPaciente(string cns, string sexo, string dataNasc, string nome, string raca, string cep, string ibge, string logradouro, string endereco, string…
-
1
votes2
answers722
viewsCalling c# method in javascript
I created a method that calls data from a database in C#. How can I call this method in Javascript ? Follows code [WebMethod] public copa recuperaDados(int cAno) { var con =…
-
1
votes0
answers53
viewsDoubt in the return treatment Ajax, receive data return from an API
I have an Asp.net web.api API I am making a method that sends the login information, I am having difficulty to do the treatment of the return, even sending wrong information is passing as certain.…
-
1
votes1
answer65
viewsMvc List only available rooms and not busy ones
I have the following problem: A reservation has associated with you a client and a room. When creating a reservation, I have to fill in some fields (such as customer name, date of arrival, date of…
-
1
votes1
answer874
viewsUnit Tests in Controller mocking EF Context
I’m not getting a solution on how to test my application (mocking the EF context) EF context: public class SawluxContexto : DbContext { public DbSet<Restaurante> Restaurante { get; set; }…