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
answer168
viewsRetrieve data from Gridview
I need a javascript function that brings the data filled in gridview and put in a lista , searching found the following function: function pegarDadosGrid(e) { var dados =…
-
-1
votes1
answer133
viewsImage (BITMAP) for String
I have never worked with anything like this and would like to insert an image into a database and for what I saw the best way is to transform an image into a string, I have searched and found some…
-
-1
votes1
answer193
viewsblock URL ID
How do I block the ID of the URL parameter of a system I own, for example, when clicking on a record it shows as/Change/12 url where 12 would be the id for example, but if the user changes 12 for 13…
asp.net-mvcasked 5 years, 6 months ago Stand Alone 350 -
-1
votes3
answers97
viewsSearch By Entity with EF
I’m new to the business and I’m on my first steps. I am trying to create a system of financial consolidation. I need it to return me the total expenses of a certain Rubric. using System; using…
-
-1
votes1
answer30
viewsShow Simulation Result on another page
I have a form that receives data from the client interested in acquiring a loan, when he clicks on simulating the program does the simulation and records in the database, until then it works well.…
-
-1
votes2
answers72
viewsMy MVC 5 application inserts into the database, but the view does not display the list of records
The following error appears: The model item inserted in the dictionary is of type'System.Collections.Generic.List`1[Systemshome.Models.Usuario]', but this dictionary requires an item of type…
asp.net-mvcasked 5 years, 3 months ago Jaqueline 1 -
-1
votes1
answer208
viewsC# ASP.NET mvc URL encryption
The q method I’m using to encrypt the URL is working, but sometimes it does the encryption with a / in the middle that makes it not find the desired route. public static string…
-
-1
votes1
answer372
viewsUser.Identity.Isauthenticated always returns false
I am implementing stunning and authentication with Identity using the concept of Claims, after I login, I am not able to save the authorization, the login returns 200 ok, but is not authorized…
-
-1
votes1
answer376
viewsView dialog screen to download with javascript
I have an MVC project where there’s a button that does the download of files but when clicking the button opens a new guide in the browser and the files are automatically downloaded, as in the…
-
-1
votes1
answer51
viewsAsp Net MVC Dropdownlist Mustache
in my application when the user clicks to include performing two queries and each returns (id and name), I set up a mustache template, and would like to load this data in two dropdownlist. the…
-
-1
votes1
answer168
viewsValidation with more Net Core MVC fields?
I need to validate on a form made in ASPNet Core MVC, but in this validation I need to use more than one field, example below: Models: public class Fornecedor { public virtual int ID { get; set; }…
-
-1
votes1
answer204
viewsPagination with search
I am trying to create a search in a grid with paging, but when it brings the search result it generates a new pagination but when I click on page 2 it brings all the results ignoring the search and…
-
-1
votes2
answers46
viewsQuery help for the problem created?
I need to create a list composed by the fields Current and Next Stage both stage names coming from the same table. Example of the result I seek: Stage Table (stage name provider) The query searches…
-
-1
votes1
answer34
viewsSending an E-mail c#
Guys, I need help. I have the following email sending controller, where I send an email for password retrieval. this email will be sent from a simple html I have in the templates folder. My doubt is…
-
-1
votes1
answer67
viewsHow to bring in Razor a Dropdown with the element already selected from a database?
I created a register where an object has n elements and each of them is selected from a Dropdown, the registration works perfectly but when I edit the Dropdowns do not show the selected item…
-
-1
votes1
answer46
viewsHow to delete the null string from the td tag?
How to remove "null" from tag ? I tried to use replace, but error occurs due to variable being null: Example: _st_versao_ofertada.replace("null",""); //Ná pode, ocorre erro. Como fazer ? <br>…
-
-1
votes1
answer294
viewsIdentify the end of the page in the scroll?
First of all, I’m sorry, I see you have other similar questions, but I’m having an error that I’ve been trying to solve for 24 hours. The above image shows a method that 'tries to detect the end of…
-
-1
votes1
answer27
viewsHow to do one authentication for two different applications on MVC5?
Hey there, guys. I have two ASP.NET MVC5 applications on the same server on the same site. I’m trying to make one authentication valid for both projects. I have already set a cookie name for both…
asp.net-mvc asp.net asp.net-mvc-5 asp.net-identity identityasked 4 years, 4 months ago Gustavo Borges 19 -
-1
votes1
answer25
viewsInternal Server Error Importing ASP.NET Project in Visual Studio Code 2019
Hello, I’m a beginner in ASP.Net MVC and I’ve been trying to open a project in Visual Studio 2019 that I was sent zipped via Dropbox. When I Build the Project no Build error appears, but the problem…
-
-1
votes1
answer15
viewsConvert datatable to Json
Datatable data can be stored in JSON? I have this code: public List<AgendaModel> MostrarTodosCalendar() { List<AgendaModel> lista = new List<AgendaModel>(); AgendaModel item; DAL…
-
-1
votes2
answers111
views@using from my view does not find the model in Asp.Net MVC
[ Hello friends my name is Wesley I already do program some time (huahuahua) I always use the platform to ask questions but it is the first time I use the platform to ask, I hope you can help me I…
-
-1
votes1
answer20
viewsLayout Logo breaks when exiting Index
Hello, my logo breaks after leaving the index, whatever the view(Edit,delet, etc.), it breaks, in the index is normal, I would like to know how to fix it, following the error and the code. I’m using…
-
-1
votes1
answer45
viewsHow to prevent a record when edited to save in duplicity?
This snippet of code saves the themes of a record. However, when I edit a record by adding a new client, the last theme of that record duplicates. That is, every time I edit a record it duplicates…
-
-1
votes1
answer32
viewsComponentization of fabrics
I have a web project in .NET Framework 4.6.1 and with Angularjs 1.2.29. Currently it perfectly serves our customers in Brazil. The point is that the product has evolved, and now we are going to…
asp.net-mvc angularjs razor internationalization globalizationasked 3 years, 11 months ago Jedaias Rodrigues 6,718 -
-1
votes1
answer23
viewsWhat is the best way to read entity properties in "Include" with similar names?
I have the following consultation: var recs = (from p in _db.Fichas .Include(c => c.Tipo01) .Include(c => c.Tipo02) .Include(c => c.Tipo03) .Include(c => c.Pessoa01) .Include(c =>…
-
-1
votes0
answers5
viewsWhen updating a Migration, an error appears stating that it is not possible to create an object at design time
I’m testing a DDD concept project called Equinox at this address: Equinox The first thing I did was to update the Migration (Update-Database) of the Equinox.Infra.Dat layer and it worked correctly:…
-
-1
votes0
answers10
viewsCreate a new select for filter from a 'New Fitro' button
would like to do a dynamic filtering where the can be added and removed a new filter type from a button. It would be a div with a "dropdonw" and a "remove" button on the select side, and out a "Add"…
-
-1
votes1
answer19
viewsHow to make a query using SELECT with conditions of LIKE '%' and Equal "=" with input of textbox and dropdowlist in C# ASP.NET
I am doing a query of people by filter, but I have come across the following problems: 1º LIKE Condition %%, (because the user will not always fill the fields "Document Number" and "Name" -…
-
-1
votes0
answers11
viewsCombine files by removing repetitions
In the following code snippet written in C# Asp.net core mvc, the application READ the.txt files and all their contents inside a specific folder, then stores the READ content in a new file (similar…
-
-2
votes1
answer82
viewsError message about something that does not exist in the application
While running my application is showing this message, but there is no such parameter. Here is the error message: <%@ Application Codebehind="Global.asax.cs"…
-
-2
votes1
answer69
viewsHow to get value from an action property?
How do I get a value from a property action?
asp.net-mvcasked 10 years ago Hans Miller 842 -
-2
votes1
answer341
viewslambda expression gives conversion error
This is my lambda ring: public JsonResult CarregaDescricaoRede(string _tipo_rede, string _uf, string _cidade) { var resultado_rede_descricao = (from _pdv in db.PDV .Where(r => r.Tipo_PDV ==…
-
-2
votes1
answer867
viewsReturn of Json
I still don’t understand how JSON works, but here I have a Controller code that returns a JSON and I want to know how to display this data on the screen. public ActionResult ShowPlaylists() { if…
-
-2
votes1
answer345
viewsHow to create a shopping cart in ASP.NET MVC
Good night! I am doing a project in ASP.NET MVC and I really need to create a shopping cart to receive all the items that the user click to add to the cart, for example the product will be on the…
-
-2
votes1
answer462
viewsHow to cache c# . NET information for multiple users?
I have a list of objects, and I would like each user who accesses a page, to add their objects to the cache. And that this cache was worth to the next person who accessed the same url. Example, I…
-
-2
votes1
answer2341
viewsHow to pass a Controller object or object list to View?
Controller: [HttpPost] public ActionResult Create(Pedido pedido) { List<Produto> lista = new List<Produto>(); if (ModelState.IsValid) { Cliente cliente =…
-
-2
votes3
answers578
viewsHow to put two action with HTTPPOST
How to put two controllers with HTTPPOST [HttpPost] public ActionResult Index(string Nomel, string Utilizador, string Password, string PasswordC) { } [HttpPost] public ActionResult Index(string…
-
-2
votes1
answer106
viewsPostman call does not enter the controller constructor with parameter
I took a project already developed, but with several problems. In the controller that I am working on, I put a break in the constructor with a parameter and does not enter. If I define one without…
-
-2
votes1
answer651
viewsConvert Datetime to Date
I need to compare a date without the time, only ("dd/MM/yyyy") with the database with Linq, but I’m not able to transform the format DateTime("dd/MM/yyyy HH:mm:s") for Date("dd/MM/yyyy")?…
-
-2
votes1
answer232
viewsThe Viewdata item that has the key 'officeId' is of type 'System.String' but must be of type 'Ienumerable<Selectlistitem>'
Controller: public ActionResult Cadastrar() { ViewBag.officelist = new SelectList(new OfficeREP().ListarTodos(), "id", "estado" ); [HttpPost] [ValidateAntiForgeryToken] public ActionResult…
-
-2
votes2
answers377
views2 devices connected to the same address via Wireless
I am using Visual Studio 2017 to run the application. (ASP.NET MVC) How can I make another computer connect the same url address: 192.XXXXXXXXXXX:56987. That is: 2 computers working at the same…
-
-2
votes1
answer269
viewsPut Asp Net MVC Identity validation
I tried to locate this doubt in the forum and could not find. I have an Asp Net MVC application that uses the Entity Framework with Identity to login. My client registration works perfectly, but I’m…
asp.net-mvc entity-framework asp.net-mvc-5 asp asp.net-identityasked 6 years, 9 months ago Mauricio3012 31 -
-2
votes1
answer132
viewsAdd form to subscribe to the newsletter in c#
Viva. I’m developing a website in c#, Asp.net using visual studio. I would like to place a small form where the website viewer places his email to subscribe to a newsletter. I’ve researched ways to…
-
-2
votes2
answers231
viewsRouting problems using Asp.net core
When trying to route a core 2.0 application, I can’t get to the controller. public class GetClientController : Controller { LoadClient loadClient = new LoadClient(); [HttpGet] public…
-
-2
votes1
answer42
viewsDelete api not working, do not delete. Stored Procedure in the database is working
This is the API public class DeleteCidade { BancoContext banco = new BancoContext(); public void deleteCidade(int id) { banco.Database.SqlQuery<Cidade>("exec sp_del_cidade", new…
-
-2
votes2
answers615
viewsHow to put a dropdownlist in a cshtml
I need to place a dropdownlist under the following conditions: It will display the name of the City(City Table), but will only record the Employee Code. Using this approach, I can assemble the…
-
-2
votes1
answer53
viewsChanging the select in SP gives error
That is the mistake: System.Data.Entity.Core.EntityCommandExecutionException: 'The data reader is incompatible with the specified 'TreinamentoCrudApi.Context.Cidade'. A member of the type, 'id',…
-
-2
votes2
answers507
viewsHow to place a url on the web.config
I have a service that calls this service: public async Task<List<Funcionario>> GetFuncionarios() { string url = $"http://localhost:56137/api/GetFuncionario"; var response = await…
-
-2
votes2
answers90
viewsValidation required with if Viewmodel
I’m trying to validate fields with Viewmodel This way it’s not working: [Display(Name = "Insc. Estadual")] public string InscricaoEstadual { get; set; } [Display(Name = "Inscrição Isento")] public…
asp.net-mvcasked 6 years, 2 months ago Mariana 2,512 -
-2
votes1
answer94
viewsReferenceerror: $ is not defined
Hello, I created an application a short time ago and got jquery via Nuget, but it keeps giving error when initializing jquery. I have the following function in a js file.…