Most voted "asp.net" questions
ASP.NET is a web application framework developed by Microsoft to allow programmers to build dynamic websites and web applications. Use the tag for traditional web forms, the classic template that provides the illusion of "stateful" pages. Do not use this tag for the style using the standard Model-View-Controller; use [Asp.net-mvc].
Learn more…1,881 questions
Sort by count of
-
2
votes1
answer160
viewsDoubts about routes Angular JS x ASP.NET MVC
I would like to clear up some doubts about Angular JS x ASP.NET MVC. Created an empty ASP.NET MVC application that will work with WEB API, configured all my routes with Angularjs, created an html…
javascript asp.net-mvc angularjs asp.net laravel-routesasked 6 years, 10 months ago Nicola Bogar 1,149 -
2
votes1
answer142
viewsRatio 1:N check date, difference 6 month
I am developing a SQL Server Database, which lists two tables: Where a process has N movements, I need to return the following data: all Process that have the column Irrecuperavel(int) = 1 and that…
-
2
votes1
answer454
viewsHow to Include and Reference . JS in my project?
Well here’s the thing, I have a file. JS in my project. I’m calling him at HEAD LIKE THAT: <script type ="text/javascript" src="~/JS/validacao.js"></script> within this validation.JS has…
-
2
votes1
answer158
viewsAdd photos and gallery to an ASP MVC product
I’m starting in Asp.net using mvc 5, I’ve taken some basic courses, and now I want to make a simple little complex virtual store. but I am in a crucial doubt in the product table, it will have a…
-
2
votes1
answer146
viewsUse variable value not yet declared. Circular Reference in c#
I know the question seems absurd but a client of mine gave me an excel spreadsheet that has a variable that is used before having its calculation defined. In excel this calls Circular Reference. I…
-
2
votes1
answer38
viewsError When Customizing MVC5 Routes
Error occurs in method (Registerroutes) in Routeconfig.Cs on line routes.MapMvcAttributeRoutes(); When running in the browser: * The built-in Constraint resolver of type…
-
2
votes1
answer181
viewsHow do I increase the selection range of a list item within a drop-down menu
How do I increase the selection range (gray color) to be wide and high as selected in red? body { padding-top: 50px; padding-bottom: 20px; } /* Wrapping element */ /* Set some basic padding to keep…
-
2
votes0
answers314
viewsOpen PDF in a new nagevador tab
I implemented a functionality in the system to generate a PDF file using iTextSharp, but this opening in the same tab, I would like it to be opened in a new browser tab. I tried to use the…
-
2
votes1
answer792
viewsEntity lambda framework with include returns empty Collection
I have a select that returns chained data and plays it in a Viewmodel created for the simple reason that I cannot return all data from my table, as in the example: var data = _context.Forms…
-
2
votes1
answer695
viewsWebcontrol input text mask
I created a Usercontrol called Ucldatavigencia very simple. Only one label and two Texts input that will be responsible for receiving a start date and an end date. I would like to apply a mask to…
-
2
votes1
answer834
viewsAPI Web Post Returns Invalid Content Type
I am trying to send a POST request to a Web API. If I do it for Postman, it works: Now when I try to perform through the code, I get the following error: { "status": false, "message": "Content Type…
-
2
votes3
answers253
viewsSearch for word variations
I have a sentence that I need to check if it meets a rule but there may be variation in writing (accentuation, more or less spaces,...) Example: string fraseProcurada = "Cadastro de Usuários - SP";…
-
2
votes1
answer57
viewsOptimize sequence of if
I have the following structure and would like to optimize the code of the if, there are already several equal parts. So I made a foreach. But the variable of type Expandoobject, I do not know how to…
-
2
votes1
answer123
views -
2
votes2
answers621
viewsDo not let browser save password
I need to make the browser does not save the user password, I have tried autocomplete="off", autocomplete="new-password", already put in the form of the page autocomplete="off", but even so the…
-
2
votes1
answer1913
viewsThe name 'Component' does not exist in the current context
I’m trying to create a Component view to reuse on the pages, I’m trying to follow some video tutorials. I’ve installed via nuget the entire Microsoft.AspNetCore.Mvc, but when I try to call it from…
-
2
votes1
answer161
viewsDownload Bank Image with ASP.NET MVC5
I am saving images in the database in varbinary format. byte[] arrayImagem = null; using (MemoryStream memoryStream = new MemoryStream()) { novaSolicitacao.Anexos.InputStream.CopyTo(memoryStream);…
-
2
votes1
answer2142
viewsRead a value inside a complex JSON in C#
Good morning folks! I’m new to C# and I’m having a hard time picking up a value within a complex Json. This is Json: { "id": "58e50b82-50b1-4f29-a2e8-a9a544013255", "timestamp":…
-
2
votes2
answers53
viewsjQuery - How to add event to control after DOM loading?
I need to add a virtual keyboard after a validation in the codebehind. The control is invisible until this validation is true. When I add the virtual keyboard with the control already visible on the…
-
2
votes1
answer58
viewsHow to create an index for viewmodel fields to be added dynamically
I am creating some fields dynamically in Asp.net core mvc to register a contact. For this, I use a partialview. Inside a div I’m adding each Row of Fields, as the user clicks on the Add New Contact…
-
2
votes3
answers257
viewsSecurity Exception on UOL Host
I developed an ASP.NET MVC application that runs perfectly on site. When climbing it to UOL Host, when accessing the page (www.manuelaibi.com.br) I have the error Security Exception... It is…
-
2
votes1
answer97
viewsJquery Pick Value Nearest Checkbox by Line
I need help with the following: I want to take the checkbox that is disabled and play on console 0 for what is disabled, and 1 for what is enabled. My source looks like this: (Asp.net mvc) @model…
-
2
votes1
answer116
viewsSave Phone Array to Database
I created a table of Clientes and two from customers who are ClientesTelefone and ClientesEmail in my form I am generating email fields and phone dynamically, so I would like to know how I can…
-
2
votes0
answers74
viewsModel not being fully validated
Good morning Guys, I’m testing an application to add a client, but whenever I try to add the user, test the Viewmodel to see if the information is consistent, but the program does not validate all…
-
2
votes1
answer52
viewsHow do I pass the value of the Tumb variable to my controller?
How do I pass the value of the Thumb variable to my controller? The two input fields then pass normally, but the Tumb variable has to pass the video Image Url. Controller [HttpPost]…
-
2
votes2
answers86
viewsLimit index query but not combo query
Good afternoon, In the company’s ERP we have a query in the Index that is limited to 80 records. The problem is that in create we have combos that bring more than 150 records and is also limiting to…
-
2
votes2
answers74
viewsColor adjustment of text on different themes
Work on maintaining a system that could only be displayed with the white background, and we recently adopted the possibility for the user to choose the dark background. Some text fields are saved…
-
2
votes1
answer635
viewsC# - Multiple keys in JOIN LINQ Lambda Expressions
I have an SQL as follows: SELECT * FROM KY_AR_SOLICITACAO A JOIN KY_AR_SOLICITACAO_ITEM B ON A.NF_ENTRADA = B.NF_ENTRADA AND A.SERIE_NF_ENTRADA = B.SERIE_NF_ENTRADA AND A.NOME_CLIFOR = B.NOME_CLIFOR…
-
2
votes2
answers679
viewsHow to pass a parameter from one Action to another Action in the same Controller
I need to send a parameter from one action to another action in the same controller, but the parameter is "reset". How can I do this? Down with the code I’m making: [Authorize] public class…
-
2
votes1
answer72
viewsProblem Initialize List for ASP.NET MVC validation
I have an action that receives a user file. [HttpPost] public ActionResult UpdateFicheiro(FicheiroViewModel model) { var listaDeFicheirosJaAnexados = servico.obtemficheirosJaAnexados();…
-
2
votes1
answer181
viewsWhat is the difference between using "equals" vs == in LINQ to Entities?
As quoted above, when I say equals from LINQ to Entities I am referring specifically to the reserved word of C# and not to the Equals() of System.Object. Source: equals (Reference of C#) The…
-
2
votes3
answers271
viewsI can’t do addiction injection
I’m working with ASP.NET CORE 2 and is a layered application. This is my ConfigureServices in the Startup.cs public void ConfigureServices(IServiceCollection services) {…
-
2
votes1
answer171
viewsList is not being passed as method parameter
I need to implement the method RoutesBetween to trace the route between a point and another (in this case, point To and And). Test method: public void TestRoutesBetweenTwoPoints() { var links = new…
-
2
votes1
answer85
viewsOrdination down the line!
On my cshtml page I have a foreach that reads this information from the database and plots on the screen in the form of checkbox, I’m trying to order or revert in decreasing form on the screen, but…
asp.netasked 5 years, 9 months ago Leandro Azevedo 303 -
2
votes1
answer772
viewsPaging library for . Net Core
I’ve worked on some frameworks like Spring and Nestjs, and there I worked with a library that listed a query page. Here at . Net Core, I have to create a method to work with it. For example: public…
-
2
votes1
answer125
viewsNull ajax values for controller
I’m getting values null on the subject by parameter no controller of asp.net core via ajax Follows the javascript with the ajax var ClienteFornecedor = { Id: "0", Tipo: $('#selTipoAdicionar').val(),…
-
2
votes1
answer182
viewsHow to pass data from a View to a Model
I searched a lot on Google and Youtube, but I didn’t find anything very clear(I might be searching wrong too). I’m new to Asp.net, and wanted to pass the data from this form (Works.cshtml) to the…
-
2
votes1
answer63
viewsList only future items in C#
I have a database with a list of shows registered with location, date and time, but I need it to return me on the admin screen only the shows that will still happen instead of listing all shows…
-
2
votes1
answer135
viewsError while using Middleware
I’m trying to use Middleware, so that every time a user logs into the system it is being redirected to condominium registration screen, he can not use the system until you register at least 1…
-
2
votes1
answer142
viewsHow to deploy a Windows container to Heroku?
I’m trying to do the deployof a container Windows in the Heroku but I’m having the following mistake: image operating system "windows" cannot be used on this platform On the website of Heroku have…
-
2
votes1
answer52
viewsHow to translate a rdlc file using resx files?
I am trying through a rdlc files to configure to fetch translations from a Resource . resx file public static Stream TranslateReport(Stream reportStream, string partyId) { var reportXml =…
-
2
votes1
answer277
viewsCheck if cookies exist in ASPNET CORE
I’m migrating from the Asp.net Webforms to the Core 2.2 and in the application, we stored information such as Id, and other parameters. In Asp.Net Core I use Seguinte Iactionresult to record the…
-
2
votes1
answer47
viewsChange the position of a Commandfield in gridview
I’m a beginner and I’m trying to create a dynamic table that can be edited and deleted certain fields so I decided to use gridview. The problem I cannot solve is the position of this commandfield…
-
2
votes0
answers122
viewslimit the number of characters per line in a multiline-type textbox
I would like in my field to allow up to 47 characters in each line, but I have a problem when the user leaves a line and keeps typing. Because it breaks the line before it completes the 47…
-
2
votes1
answer182
viewsEntity Framework Sum and Count different status
In my ASP.NET MVC project, I’m trying to achieve the equivalent of this SQL Server code: Select e.Numero, e.ValorEmprestimo, Count(Case when pvp.IdeStatus = false and pvp.DatVencimento >=…
c# asp.net-mvc asp.net entity-framework-6 entity-framework-coreasked 5 years, 2 months ago Pedro 186 -
2
votes2
answers72
viewsHow do I pass the right string value to my controller? from the error when returning to Edit View
**// Tentei destas duas formas e não consegui nenhuma!** // Onde tem item.nome é de um foreach que me retorna nome de uma pessoa <span data-toggle='tooltip' data-placement='bottom'><a…
-
2
votes1
answer53
viewsHow to add Account to the Asp.Net Core project
I’m new to Asp.net core mvc and I’m having a hard time, I have a project that in visual studio I have a solution for 4 different projects. Let’s just say it’s Project A and Project B. Project A…
-
2
votes1
answer44
viewsProblems creating items from a dropdownmenu submenu using Javascript
I have a dropdownmenu that works normally when I load it using Asp.net core + Razor. Inside it I have the submenus Phones and WEB... When I try to recreate the submenus due to an app need, their…
-
2
votes1
answer203
viewsTernary relationship of entities in a relational scheme would be counter-normative, and how to do this mapping in Entity framework 6?
Taking as an example: We can abstract the relationship in several ways, one of them would be putting relation of N p/ N between project and skills needed, while another for employee and skills…
-
2
votes1
answer155
viewsDropdown materialize does not recognize click on smartphone in Chrome browser
I have a table that has a materialize dropdown, which when selected by PC/Notebook works normally. But when clicked by some mobile device with the same browser it does not recognize touch as click…