Most voted ".net" questions
The Microsoft . NET is a set of libraries and functions that are part of the Basic Class Library (BCL), such as user interface functions, data access, connectivity, cryptography, web development, mathematical algorithms, and network communication.
Learn more…2,689 questions
Sort by count of
-
0
votes1
answer43
viewsgetters and setters do not work with Httpget
Good afternoon guys, I have the following code: [HttpGet] public JsonResult ObterGridParceirosComPaginacao(PaginacaoVueTableViewModel filtro) { Resultado resultado = new Resultado(); var viewModel =…
-
0
votes0
answers696
viewsCannot read Property 'Name"' of Undefined at Object.Val [as updateDirectives]
I’m doing an Asp.Net Core Web API with Angular 7 CRUD and I’m having trouble in the final phase, just when I enter my angular localhost and open the console, I come across the following log (Note,…
-
0
votes1
answer82
viewsGet the logged in user id
I found many questions of this kind here in Sopt but none that specifically talked about C# in Winforms. Well, I have a login screen and would like to pick up the id of that user who is currently…
-
0
votes1
answer83
viewsPagemodel.Page() is a method, which is not Valid in the Given context
I’m needing to use a script from an Alert() in my project . NET core Razor, and when I add the line: Page.ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Hello…
-
0
votes1
answer195
viewsHow to take the content of a textarea and show in a modal
I wonder if I can take the content of a textarea (which in this case is a Texbox) and show in a modal, in my case: Follow the code I made: <asp:Label runat="server" CssClass="text-bold"…
-
0
votes1
answer236
viewsInstantiating form to lock button
I’m instantiating a form with a single textbox just to put the password to release the button action. The button has the function of exporting the data contained in datagridview for a spreadsheet in…
-
0
votes1
answer37
viewsAbnormal error entering a Methodinfo page.Invoke "Parameter count error"
I’m calling the following function put it gives this problem "Parameter count error" when executing: url = (string)miScriptReference_GetUrl.Invoke(this, new object[] { scriptManager, value, false…
-
0
votes0
answers1629
viewsCreate installer in Visual Studio 2019
I created an installer for my solution in Visual Studio 2019 using the Setup Wizard (component of VS itself), and configured it so it was to my liking, I changed the debug application for release…
-
0
votes1
answer73
views -
0
votes1
answer39
viewsRewrite Data from an Object List in HTML
Hello, I have a List of objects that is being created in an Onget method and I need to get all the data from it to put in my html page, as I can recover this data? List<string> MenuPrincipal =…
-
0
votes3
answers62
viewsHow to choose the page URL (vice versa)
Hello, I’m developing a project with .NET Core Razor, and I have a file structure like this: When in the browser I go to the Menuprincipal page, the URL looks like this:…
-
0
votes1
answer47
viewsError mounting String with parameter . NET
So guys, I’m developing a project with . NET Core Razor, and I’m assembling a string there, as follows: string TotalInformacoes = ""; TotalInformacoes += (!String.IsNullOrEmpty(cl_1.Trim()) ?…
-
0
votes1
answer190
viewsPass form parameters to the reportview and generate proof with the information in Visual basic.net
All I want is to pass the parameters to the reportview and generate a voucher with the information that is in the text fields. what I can’t do is pass the parameters... I have an example in c#…
-
0
votes0
answers452
viewsI cannot install package I created . NET - NUGET
I recently created a package in Nuget in order to perform some tests with a private Nuget server. I did it this way in Visual Studio 2017: I created a new Class Library project (.NET Standard) I…
-
0
votes0
answers25
viewsCreate a web form model
I’m putting together a web page with . Net Core and I have a web form that has many fields and I was thinking about how to get all this information filled out more dynamically, I asked a question…
-
0
votes1
answer87
viewsTaking values from a form using a model
I’m creating a web form and I’ve been told here at Sopt to use a model, since I’m using . Net Core Razor. I am trying to create the model, to pass parameter but I cannot recover the values of the…
-
0
votes1
answer30
views.NET fix URL sent in a POST Request
Good afternoon Amigos! I have a problem receiving a URL with the POST method. I make a request ajax as below: $('#ajaxButton').on('click', function () { const data = document.referrer.toString();…
-
0
votes0
answers2051
viewsCustom userControl events still running in the code in the visual studio, is that a bug?
I am developing in WPF, and while doing a custom userControl, I had a surprise, when I went to use the Events "Routedeventhandler Loaded" and "Routedeventhandler Unloaded" of…
-
0
votes0
answers85
viewsReturn select Asp.net core MVC value
Good Morning, I have a question, I have an application in Asp.net core. When selecting a Dropdownlist I want to receive this value without pressing the Ubmit button, but I don’t know how to do it,…
-
0
votes0
answers61
viewsError injecting framework repository into . net core
I’m having trouble trying to inject dependency into a repository. NET framework and API . NET Core and the problem below: An unhandled exception occurred while processing the request.…
-
0
votes2
answers224
viewsSave legacy data in C#
I have the following classes: public class Aluno { public String Nome { get; set; } public String Ra { get; set; } public Decimal NotaB1 { get; set; } public Decimal NotaB2 { get; set; } public…
-
0
votes1
answer184
viewsError passing parameter to Sqlcommand by parameterizing table
I’m trying to pass parameter in mine select and this bursting the exception: It is necessary to declare the table variable "@p_tabela". using (SqlConnection conn = new…
-
0
votes1
answer107
viewsGetvalue() does not show value that is assigned to the variable
static void Main(string[] args) { // ASSIM FUNCIONA //var ObjGeneric = new Pessoa(); //ObjGeneric.Nome = "PAULO TADEU CHAGAS"; //ObjGeneric.Idade = 25; //…
-
0
votes2
answers98
viewsCS0847 error in matrix code in C#
I’m making a simple matrix code in C# to display string values, only it appears CS0847 Error: Matrix initializer of length "3" on line 9 and did not understand what it means. using System; namespace…
-
0
votes1
answer271
viewsProblems with Msbuild version
In the company where I work, front development is completely separate from back. Therefore, front developers do not have Visual Studio installed and rely on devs. Net to build and raise Dlls so they…
-
0
votes0
answers327
viewsError while doing GET on . net CORE
Good afternoon, I am studying . net core with Angular and when making a GET request I have the following error: : Microsoft.AspNetCore.Diagnostics.Developerexceptionpagemiddleware[1] An unhandled…
-
0
votes1
answer200
viewsNewtonsoft.Json.Jsonconvert.Serializeobject excluding @
I am running Schema for my page and need to convert the information to print it in JSON. However Newtonsoft.Json.JsonConvert.SerializeObject(schema); removes "@" from "@context" and "@type". Like…
-
0
votes2
answers887
views -
0
votes0
answers47
viewsAsp Net application does not run
Someone could explain to me why, when running my application on Asp Net it does not run, presenting the message "Server Error in Application '/'."? Error screen: File Routeconfig.Cs: namespace…
-
0
votes2
answers255
views -
0
votes1
answer392
viewsError Dispose(bool)': no suitable method found to override C#
I’ve checked on other forums and even here, but that’s it correct with the class name o namespace is the same. He caused me other mistakes besides this, but this I believe is the main one that is…
-
0
votes2
answers180
viewsReceive data in a matrix c#
Hello, I was testing code to learn how to mess with the matrix, but I’m not able to store broken numbers in the variable. he of the error of System.IndexOutOfRangeException and I can’t solve.…
-
0
votes1
answer60
viewsCorrectly print a double value using Tostring()
I’m having difficulty printing a monetary value correctly with the distribution of its decimal places, I used the ToString() using parameters such as "C", "F" and "N", what needs to be done to leave…
-
0
votes2
answers85
viewsPerformance between creating multiple objects or just one
I always had a question regarding the code blocks below, which would behave faster taking into account the service: foreach(var t in listaT) { using(TService service = new Tservice()) { t =…
-
0
votes1
answer59
viewsHow to use the . Sqlquery expression of EF in Efcore?
I’m refactoring a code and I’m having that doubt. public class MovimentoManualListRepository : RepositoryBase<MovimentoManualList>, IMovimentoManualListRepository { ConsultarContext _context;…
-
0
votes0
answers98
viewsIntegrating C# projects with VB
I need to create a C# project that uses a DLL that was written in VB.NET. I added the dependency, imported the library and used the method. However, at the time of execution when I will consume a…
-
0
votes1
answer911
viewsTLS 1.2 Requests with Restsharp
I need to use TLS 1.2 in an HTTP request with Restsharp. Every time I make a POST, it reports the error "The underlying connection was closed: Could not establish trust for secure SSL/TLS channel.".…
-
0
votes0
answers131
viewsRoutine execution in the background via Hangfire (ASP.NET Webforms)
I am in need of doing a background run on my system. For this I found the Hangfire tool. I made the settings according to the documentation and am getting the error: Value cannot be null. Parameter…
-
0
votes1
answer152
viewsJSON Customized for Dataannotations - Asp.Net Core Web Api
Good afternoon! I have a Web API in . Net Core, where I have the following request class for a POST route: public class CreateAgentRequest { [Required] public Agent Agent { get; set; } } With…
-
0
votes2
answers74
viewsCreate methods in classes to manipulate fields
I made a code of a binary association between two classes Cliente and Caixa, some methods I might not understand how they are inserted into the code in logical way, but the code itself is working, I…
-
0
votes1
answer63
viewsWhy isn’t this program running the commands inside the second function on?
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace EX7 { class Program { static…
-
0
votes0
answers737
viewsWCF Error - Request cancelled: Failed to create secure channel for SSL/TLS
I’m having a problem when it comes to using the HttpWebRequest, the first time I call the method to effect sending an NF-e to Sefaz’s Webservices it performs normally but the second time I try to…
-
0
votes1
answer52
viewsProject cannot solve mscorlib for Framework . NET 4.5.2
I have a C# Windows Form project that uses Framework 4.5.2. I bought a new notebook and I am trying to run this project, but when trying to run it does not appear any error and even then the project…
-
0
votes1
answer50
viewsHow to put 'Ws:' only in the first xml node of a WCF service request?
I have a WCF application that has a vehicle.svc service as in figure 1. In the vehicle service.svc has a recording method that receives a vehicle DTO as in figure 2. public class VeiculoDto { public…
-
0
votes1
answer70
viewsDelete element from string array in mongodb
Hello. I want to delete an element from a string array, in this case it is the Profiles array, which is present in the Person Document. This in an application developed in . net and with mongodb…
-
0
votes1
answer39
viewschange webconfig mysql+ Connection. NET
I have this site using Entity framework running normally in mysql localhost database, now I want to put on a server, I have tried to change several times the conneciton string, but it gives two…
-
0
votes0
answers339
views"The underlying connection was closed" error in REST Httpclient C#
I’m doing a REST integration with C# used Httpclient, most of the time the data was sent successfully, but I went to investigate why some of these were returning with error, found that what they had…
-
0
votes1
answer147
viewsCors Error - Visual Studio . Net Web API React
I have a project where the back is in . net and the front in React. I can do all CRUD operations with Postman, however in React I get Cors error. I understand the cause of the problem, but I cannot…
-
0
votes1
answer41
viewsRequest ajax forwards call to controller
Talk to me, people. I have a problem with item registration, when you list a series of items and I click add opens a new modal with the characteristics of the item that will be added. However when I…
-
0
votes1
answer46
viewsButton to insert records into the Database
Great, I’m running a project for my PEF that consists of creating a BD for a company. However, I decided to put a button to add records and when I click to add, the following error appears: Failed…