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
votes1
answer41
viewsShow grouped data in view
have the models department and institution, how do you see yourself next. public class Institution { public long? InstitutionId { get; set; } public string Name { get; set; } public string Address {…
-
0
votes0
answers12
viewsError retrieving Client Data for Editing - C#
Friends, I have a table "person" and "address", I can register a customer and insert their information in the two tables, but I’m having difficulty to consult the customer’s information and bring it…
-
0
votes1
answer32
viewsBringing a Controller Query to the View
I’m starting to venture out and learn about MVC and C#. I created a movie catalog application with a tutorial, where I have a table in the database called Movie and in the application I do a CRUD in…
-
0
votes0
answers47
viewsError when creating a CRUD in ASP.NET Core MVC with Entity Framework?
I am new to programming and am creating a CRUD in ASP.NET Core MVC with Entity Framework, SQL Server database, through an Internet tutorial, downloaded the blessed nugets packages, which are:…
-
0
votes1
answer42
viewsHow do I test the API gateway of a project in microservices
How do I test the Api gateway of a project in microservices? I configured Ocelot.json as below, and when I call in the browser /Billing get the bug:…
-
0
votes0
answers16
viewsCommunication between Applications using Httpclient with SSL error
I have an IIS 10 server with two applications developed by the company. The first, older, is an MVC developed in . Net Framework 4.5. The second, newer, is an API developed in . Net Core 3.1. In…
-
0
votes1
answer17
viewsDo not select any dropdownlist value
Hello I have the following dropdownlist: @Html.DropDownListFor(m => @item4.Status, new List<SelectListItem> { new SelectListItem { Text = "Sem malha", Value = "Sem malha"}, new…
-
0
votes2
answers214
viewsHow to calculate average students and show in percentage?
I’m trying to create an algorithm in C# as it is in the exercises, in the visual studio, to calculate various average students and show students above average in percentage,I tried a code but this…
-
0
votes1
answer71
viewsModal bootstrap opening a redirect page that should not be inside it
Inside the controller of my partial View that are opened in modal I make a validation if the token is valid, in case everything happens well it will open and show the content, and this happens…
-
0
votes0
answers47
viewsError calling endpoint: Exception has occurred: CLR/System.Nullreferenceexception C#
Guys, I’m trying to generate a spreadsheet filled with the data I have from SQL server, I can get that information right but when I call a method responsible for taking that information and…
-
0
votes0
answers27
viewsConversion error in Where clause when filtering records using EF Core 2.0
I’m getting a list of records and filtering according to the given parameter. The problem is that an error is appearing in which I do not know (as picture). There are two classes : Personal Document…
-
0
votes1
answer27
viewsError sending Controller object to View
I am creating a small project in Asp.net MVC 5 to train and I am having problems passing a Controller object to the View, is showing some error related to the Where<> method of the LINQ…
-
0
votes0
answers22
viewsEdit using PUT method
I wanted to make an edition by PUT method, but I have some problem with the query string. I could not solve so far because I am a new programmer in . NET Core. I have tried to define route, use…
-
0
votes0
answers23
viewsAdd HTTP response header (Access Control Allow Origin)
In my ASP.NET CORE MVC application I have the dist folder in wwwroot: According to the documentation Static Files in ASP.NET CORE configured the startup class by adding an http response header:…
-
0
votes0
answers15
viewsString parameter in URL - MVC
I am using a url to access another url, and then in case I use encoding in the parameter, when generating the URL is this way:…
asp.net-mvcasked 3 years, 4 months ago Mariana 2,512 -
0
votes0
answers16
viewsWhy can’t I handle errors when mapping tables?
How can I improve error handling when mapping tables/views? I already solved the error, but I need to e-mail a message with details of the error, as it is not Code First, I end up having these…
-
0
votes0
answers18
viewsSend content from an index to an Edit via AJAX with . NET
I’m creating an approval screen and when the user clicks fail will appear a pop-up to describe the reason for the refusal ... The problem is that I am not being able to send via AJAX the information…
-
0
votes0
answers18
viewsAjax request using Asp . net core
I’m having trouble with this request... It’s returning 'not been' on the console. The getValue() method is in the Controller/Homecontroller.Cs /* JS */ var obj = { emails: 'teste' } var json =…
-
-1
votes2
answers4499
viewsSave images in repository and recover it through a Path with C#
How to save images in repository and recover it through a Path with Asp.Net MVC? Searching in some places, I found that saving images directly in the database may have a significant loss of…
-
-1
votes1
answer4745
viewsReference System.Web.Webpages.Razor, Version=1.0.0.0. The system cannot find the specified file
We work Aki in the company with SNV with projects. One day the server stopped working, it was a job to recover the projects. But there is a project that has a reference error with the following…
asp.net-mvcasked 10 years, 4 months ago Julio Bandeira 111 -
-1
votes1
answer846
views"Invalid App Id" error on "Like" Facebook button
I’m doing a blog and I’m putting the button like. The code I’m using is: This is at the top of the page: <script> (function (d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if…
-
-1
votes2
answers809
viewsPass parameters via jquery to my model
I’ve always passed paramatros to my controller like this: url: '/Minha_Controller/Minha_Função', .... Now I need to pass parameters directly to My Model and I don’t know how to do it. I have this…
-
-1
votes1
answer888
viewsViewbag losing reference after sending form. Asp.Net MVC
Hello, I have two Viewbags that are storing a list each, I click them in a form to make a select box, along with them has a Remove button. So far so good, but when I click on the button of the first…
-
-1
votes1
answer74
viewsPersist in my database values passed by a Dropdown in my html?
I have a dropdownlist with all the states of Brazil. For example: public IEnumerable<SelectListItem> ObterUF() { return IncluirSelecioneNoDropDown(new List<SelectListItem>() { new…
-
-1
votes1
answer104
viewsForeach result behaves unexpected
I have been working on a page, where I need to create a treeview system with checkbox and this is consuming a lot of my time and leaves me worried about the project’s SLA. In the controller, there I…
-
-1
votes2
answers568
viewsHow I do a foreach inside the View in a Viewdata
Those are my Viewdata on the controller: public ActionResult Acao() { RupturaEntities db = new RupturaEntities(); var _listaUnidade = Enumerable.Empty<object>(); var _listaFamilia =…
-
-1
votes1
answer147
viewsHow to use or add aspx pages in an Asp.Net MVC project
You can use or add to my project that is on Asp.net MVC a page that is ready in webforms (aspx and Cs) ? If yes how do I add the page ?
-
-1
votes1
answer73
viewsDifficulty in filtering information
I know my problem is logical and it must come from me, I know, but sometimes a light, not a code ready, but the pointing of a path helps us a lot. 1) I have 6 Combobox in my View that make the…
-
-1
votes1
answer104
viewsGet currency quotes from date
I am making an application and would like to know if there is any way to get currency quotes from an X date (not necessarily will be the current day) via Webservice consumption.
-
-1
votes1
answer88
viewsThis error message appears when running my program
When running my program the following error arises: >Error 1 'AgendaMVC.Models.AgendaDBContext' does not contain a definition for 'Agenda' and no extension method 'Agenda' accepting a first…
-
-1
votes1
answer167
viewsHow do I get the value of the parameter sent by a view and persist in the database?
When I set mine action register address, she picks up the codigoCliente, parameter master/CadastrarEndereco?codigoCliente=1011. How to persist the chosen customer’s address? My actions: public…
-
-1
votes2
answers831
viewsUsing dynamic maps with the Google Maps API
I see examples of how to use the Google Maps API and usually in the examples I see, there is always a default coordinate (initial). Now, let’s say I make a program and distribute this application to…
-
-1
votes1
answer205
viewsBootstrap/Razor Second panel makes Collapse in the first
What happens is that I have 2 topics in the database that are inserted automatically in the page and even here everything well, but starting with the panels closed or open if you click the second it…
-
-1
votes1
answer48
viewsDoubt with Location path Asp.net mvc
I have an application in the server root folder running normally, on the web.config I have right after the Configuration tag: <configuration> <location path="."…
asp.net-mvcasked 8 years, 8 months ago Harry 3,805 -
-1
votes1
answer117
viewsHow to organize viewmodels and mappings in the project?
Good morning, everyone ! I am studying about mapping (model and viewmodel), using implicit Operators. But a question arose: How to organize the viewmodels and mappings within the project ? Where…
-
-1
votes1
answer82
viewsIf Else of date
I have a viewbag, and wanted to display dates of at most 1 day before the current day, I did the code below, but without success, which alternative I would have? if (item.DataHora < DateTime.Now…
-
-1
votes1
answer173
viewsIs hybrid hosting with a single domain possible?
I have a client who has a site in PHP, but the developer told him that there was no way to do with his database. He asked me to make a system for him that could make a customer CRUD. Since he has a…
-
-1
votes2
answers172
viewsHow to display a modal(bootstrap) stating that the input type="file" cannot be null?
I have an input: <input id="imagens" type="file" multiple name="file" accept="image/x-png, image/gif, image/jpeg" required /> And the following javascript code: var fileUpload =…
-
-1
votes2
answers342
viewsHow to receive a javascript value within a c# ASP.NET block
What I’d like to do is convert a value from within a JSON to Double and apply the String.Format("{0:N}", valor_JSON)); so I’d be converting 1000 -> 1.000. However, as already answered, it is not…
-
-1
votes1
answer219
viewsRecord Video and Upload C# MVC
I have to record a 5s video on the webcam, after the recording upload this video to a folder. I have already searched several plugins in JS, I used this "…
-
-1
votes1
answer488
viewsHow to perform a Left Join with LINQ C# using my SQL?
Example that works in SQL: select * from Doacoes inner join Projetos on Projetos.IdProjeto = Doacoes.IdProjeto left join Pedidos on Doacoes.IdDoacao = Pedidos.IdDoacao left join Recompensas on…
-
-1
votes2
answers161
viewsChange the "Web Reference URL" of the Webservice added by add web
I wonder if it would be possible and how to make this change by taking the web address.config…
-
-1
votes1
answer331
viewsSybase database connection with c#
I have a Sybase database file on my machine, I want to make this database available in my application c#, how I make this Sybase database file available, and how to access this database with c#?…
-
-1
votes1
answer545
viewsShould I use html.Raw in every application?
Hello in all Partialview of my site, I had to put Html.Raw to solve problems with accent ( even in Head put UTF-8 and in web.config globalization ) only with Html.Raw solved, my question is can I…
-
-1
votes1
answer76
viewsChoose folder with mvc c#
How do I allow the user to choose the folder in which to write a sheet? The call will be from an Razor view of mvc.
-
-1
votes1
answer33
viewsGet email from current User
I developed an application, however I want to get the current user email (because aesthetic and requirements issues). I can only get the user name through the following code:…
-
-1
votes1
answer54
viewsDoubt vscode - ASP.NET
Eae personal, how to create an ASP.NET project, the tutorials I searched use the New Project, but it is not appearing this option, only New File.
-
-1
votes1
answer367
viewsCreate List in javascript
I have a view and within that view, have my scripts, need to create a function that creates a lista of my ViewModel ex: public static List<ContatosViewModel> ListaContatos = new…
-
-1
votes1
answer143
viewsSpecify custom View paths in ASP NET Core 2.0 MVC 5?
I’m having a big problem specifying the path I want the controller to search for the view relating to it. I’m using more than one subfolder within an area: I want the controller to be able to…
-
-1
votes5
answers258
viewsHow to open more than one View in a controller?
I have a controller called Request: [HttpPost] public ActionResult Pedido() { return View(); } How to open more than one View in a Controller? By calling a Controller would like to open two views.…