Most voted "asp.net-core" questions
ASP.NET Core is a Microsoft framework as a redesign of ASP.NET.
Learn more…663 questions
Sort by count of
-
1
votes1
answer90
viewsPassing code to cshtml page Asp.net core Razor
As I pass this code that is on a page . Cs to a cshtml page. ApplicationUser user = await UserManager.GetUserAsync(User); This page is the layout, no Model and no DTO. Thank you…
-
1
votes0
answers512
viewsHow to hide properties of an ASP.NET Core model entity only in JSON rendering?
I am starting studies with ASP.NET core Web Api, and am implementing the User class, which has a Password property. Logically I don’t want the password to be visible in the Jsons of the api. I’ve…
asp.net entity-framework asp.net-web-api asp.net-coreasked 6 years, 11 months ago Rômulo O. Torres 437 -
1
votes0
answers563
viewsSet Fixed Port for Projected Web API Asp.net Core C#
I would like to know how to set up a standard fixed port for my Web API application on Asp.net core.
c# asp.net-mvc asp.net asp.net-core asp.net-core-web-apiasked 6 years, 3 months ago Nicola Bogar 123 -
1
votes0
answers61
viewsrequire() on the client side
I am currently studying integrations with IBM Watson, more precisely Speech to text, I would like to integrate this solution on the client side, so that you do not need to make requests to the…
-
1
votes1
answer363
viewsHow to add fields dynamically and link them to viewmodel in Asp.Net
I have a 1:N relationship between Person and Contact. In my view, I can list all the contacts of a customer when it is opened. I need to implement the "New Contact" button so that when clicked,…
javascript asp.net-mvc asp.net asp.net-mvc-5 asp.net-coreasked 6 years, 2 months ago Master JR 1,853 -
1
votes0
answers200
viewsPagination problem X.Pagedlist
I am trying to implement X.Pagedlist pagination, but on this line: @Html.PagedListPager(Model, pagina => Url.Action( "Index", new { pagina, search = ViewBag.Busca })) I’m getting the following…
-
1
votes1
answer48
viewsHow to show queries generated by EF core
A while ago, with a simple code within my context, I would show the queries generated by EF6 on the console or even write to a txt file... However, today I use Entity Framework Core, in an Asp.net…
-
1
votes1
answer308
viewsQuery in . NET Core
I am learning the logic of MVC applied in . NET Core but I have some doubts about doing the process CRUD, more specifically the Consultation. How can I make the button click communicate with a…
-
1
votes1
answer49
viewsHow can I evaluate performance in a . net core application in f#
I would like to profile my application asp.net-core developed in f#. I could not use the profiler included in the visual studio for this purpose. How can I evaluate the performance of my…
-
1
votes2
answers61
viewsVariable keeps zeroed in a mathematical expression
My little show is like this: public void CalculaProporção() { decimal contagemSubida = 0 , contagemDescida = 0; int cSubida = 6, cDescida = 4, range = 10; contagemSubida +=…
-
1
votes1
answer562
viewsValidating an Ionic Login form 3
How to validate a Login form that contains EMAIL and PASSWORD in Ionic 3? It is necessary to create a new component to validate these fields ?
-
1
votes1
answer64
viewsHow to pass information in Viewdata on Asp.net core MVC
How to pass information (product name) from my controller Products to my Products view index by Viewdata?
-
1
votes1
answer86
viewsTimestamp in C# for persistence in Sqlserver
Is there any typing that already treats this in C# to perform persistence in Sqlserver database? I need to resolve the Createdat and Updatedat property. For each change, it will be stored in the…
-
1
votes1
answer704
viewsHelp with Boostrap 4 side panel overlaying content
Good afternoon. I am creating a project in Aspnet Core 2.1 with boostrap 4, I added a left side menu, but it is getting above the content of my project as the print below: I would like help so that…
-
1
votes1
answer45
viewsError opening View with values loaded directly from class
I have a default Login screen, which has the functionality "I forgot the password", which when clicked will check the number of the user ID typed on the screen, and if respected, will open a new…
-
1
votes1
answer1018
viewsSave User Session/Cookie when logging in
In WEB applications usually on the Login screen has the option Remind me, in this application will save user data once the same leave marked the option. So when the user enters the site again,…
-
1
votes1
answer47
viewsAccess to EF Core data
Doubt access to data efcore I have a table with many fields, I’m using EF Core for access, it is possible to return only the fields that I will actually use? Ex. in a listing, precise ID and Title,…
-
1
votes1
answer274
viewsHow to use NPM and Yarn in ASP.Net Core?
I’m having trouble using Yarn/NPM in ASP.Net Core. I am installing packages as follows: (Example installing Jquery) Yarn: yarn add jquery NPM: npm install jquery Everything normally occurs, the…
-
1
votes1
answer216
viewsDoubt in Asp.Net Core Identity’s Verifyusertokenasync method
I have a question about Verifyusertokenasync of Asp.Net Core Identity If the user forgets the password, I provide a page to indicate the email and send a url that has the Userid and Token (in the…
-
1
votes1
answer132
viewsIs it possible to apply CSS style in email sending method?
I have the following method that sends a password recovery email to the user. I wonder if it is possible to apply some type of CSS formatting in it, in order to make more attractive the sent email.…
-
1
votes1
answer500
viewsHow to pass a URL in the Parameter of an API
How to pass a URL to an API public class HTTPController : ControllerBase { [HttpGet("URL={URL}")] public JsonResult GETURL(string URL) { } } However when passing for example https://google.pt this…
-
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
votes2
answers70
viewsChoose path index
Hello, I’m with a project . NET Core Razor. My page index is inside the folder Pages, and I would like to put my page index inside the Test folder that is inside the pages folder, for example…
-
1
votes1
answer153
viewsIs there a reference for system.web in Asp.net core 2.1?
I’m setting up a Helper and need to use Httprequestbase on Asp.net core, but I can’t find a reference How could I add ? Thanks
-
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
answer237
viewsEmpty Multipart/form-data (ASPNET CORE)
I am trying to send files to my api via 'POSTMAN', but when the request arrives at the API endpoint 'Iformfile' always comes empty. POSTMAN Controller [AllowAnonymous] //utilizada apenas para teste…
-
1
votes2
answers476
viewsSave/Recover Files with PDF Extension
To save files with extension PDF in the database it is necessary to do the conversion to base 64? Or would there be some other way to save this type and its recovery for viewing? The code I have…
-
1
votes1
answer384
viewsPhoto conversion to Base64 with 414 error (Request-URI Too Long)
I have the comic down making the conversion of a photo to base string64 sends the base via AJAX to the controller, but by moving on to the ajax, return the following error: Photo conversion is done…
-
1
votes3
answers154
viewsHow to "mount" a multiple variable?
Would it be possible to mount a variable to pass a value to it? For example: var teste0 = "valor"; var teste1 = "outro valor"; var teste2 = "mais um valor"; for(int i=0;i<3;i++){ teste+i = "mudou…
-
1
votes2
answers262
viewsAdd value to a string list
I have a class, and in it I have a List<string> and I just create it to add the values elsewhere. But when I try to add a value, I get the following error: Nullreferenceexception: Object…
-
1
votes1
answer721
viewsConnect to database using . Net Core 2
I am studying . Net Core 2 and I am unable to make the connection to the database. My appsettings.json looks like this: "ConnectionStrings": { "DefaultConnection":…
-
1
votes1
answer1131
viewsUse Ilogger with . Net Core 2
I am studying . Net Core 2 and I have a question. I am wanting to log error in my Repository layer and only saw example in Controller. Some specific reason for this? Follows my codes:…
-
1
votes1
answer156
viewsEntity Framework Core - Composite Key
Until version 1.0 of EF Core I was having problems doing UPDATE on a database record that contained a composite key. If I tried to change the ID value of one of the compound key fields, it was not…
-
1
votes0
answers49
viewsDoubt Json MVC Core Razor
I have created a method to perform a Insert through Ajax, thus: function SalvarHorario() { //NomeHorario var nome = $("#Nome").val(); var token = $('input[name="__RequestVerificationToken"]').val();…
-
1
votes2
answers380
viewsAsp.net core 2.0 authentication with cookies
I am making an authentication using cookies following the examples Custom Authentication in ASP.Net-Core Creating a simple login in ASP.NET Core 2 using Authentication and Authorization (NOT…
-
1
votes1
answer234
viewsHow to turn a JSON into a table/paged list using . Net Core MVC?
I’m studying API access and I’m using the Github API. I want to make a screen in which it is possible to search by name the repositories that match the criteria passed. But Github’s results are…
-
1
votes2
answers1870
viewsHow to pass input value via post on Asp.net core Razor
I would like to know how to pass the entered value in an input to a Post method in Pagemodel. In cshtml: <div class="col-sm-6"> <label asp-for="Tickets.Identificador"…
-
1
votes3
answers621
viewsChange Asp.Net Core version
I installed version 3.0 of Asp.Net Core in my project, but I will need to change to an earlier one in the case of 2.2, there is some way to do this?…
-
1
votes1
answer668
viewsPass parameter to another page
Within people, I own the accounts receivable table, where I am calling the accounts receivable create page, and Edit. So far, it’s working perfectly. However, within receivables, I have one select,…
-
1
votes1
answer960
viewsError The type or namespace name 'Model' could not be found
I’m getting the error message below on instruction @model FuncionarioModel Error: The type or namespace name 'Funcionaiomodel' could not be found (are you Missing a using Directive or an Assembly…
-
1
votes1
answer54
viewsCan I run ASP.NET on Nginx without Kestrel?
Is it possible to host my ASP.NET site directly on Nginx, just like PHP would? No need to use Kestrel and Nginx just as one proxy reverse.
-
1
votes1
answer1468
viewsHow to submit a post request using Xios and Asp.net Core Web API?
I’m making a requisition with axios with the verb post, but I’m not getting it. Note> With the verb get I can do the requisition. Object cliente: { nomeCompleto: '', cpf: '', email: '', endereco:…
-
1
votes3
answers135
viewsMVC: parameter in URL is not being passed to controller
I am running the Action below, but the parameter "Artigooucategoria" is not being passed to the Controller. I am working with Asp.net core 2.0. public async Task<IActionResult> Buscar(string…
-
1
votes1
answer34
viewsHow to get an instance in . net core without using constructor
Normally I use the constructor to get dependencies something like: public class Test { private IServiceDependency serviceDependency; Test(IServiceDependency serviceDependency) { _serviceDependency =…
-
1
votes0
answers20
viewsHow to query data saved in JSON in . Net Core’s Dbcontext
Hello, I’m having a question regarding how to query a list or even a single record that was saved in the database in JSON format. For example. These are the data saved in JSON format in the…
-
1
votes0
answers438
viewsHow to change the angular version within an Asp.net core project
I have an Asp.Net Core 2.0 project. Well, I now need to build some screens to make one CRUD using Angular. One should use the Angular 6, here at the company. Well, when I added in this Solution the…
-
1
votes0
answers214
viewsThe field Valor Pago must be a number. ASP NET MVC
I own this field at Model: public decimal Valor { get; set; } It records correctly, and shows me the value in this way: 10,00 But when I edit, and complete the action, it returns to me : The field…
-
1
votes1
answer121
viewsError using add-Migration command. Using json as configuration file
Good morning! When performing the add-Migration command, to make the migrations, I am receiving the error sequinte: Add-Migration : Exception calling "AddFromFile" with "1" argument(s) : "'basePath'…
-
1
votes0
answers21
viewsReports in . NET CORE 3.1
I am migrating a system in the company that uses Reporting Services, which is not used in . NET CORE. The company asked me to go after Reportservice-like tools that were free and applicable on . NET…
-
1
votes1
answer1616
viewsThe field Sale Price must be a number. MVC
I have a field, price sale, that model is like this: public decimal PrecoVenda { get; set; } In Viewmodel he is like this: [Display(Name = "Preço de Venda")] [Required(ErrorMessage = "O campo {0} é…