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
-
1
votes1
answer199
viewsSubmit the form within a modal view redirects me to the view page
I have an MVC project. A View Home/Index charges the View Usuarios/Create in the form of a bootstrap modal. However, my <input type="submit" /> redirects me to the view address…
-
1
votes0
answers18
viewsHttpmessagehandler vs Delegatinghandler
DelegatingHandler inherits from HttpMessageHandler. But I did not understand the difference, since it is necessary to implement the same method: SendAsync, to perform the same operation. What’s the…
-
1
votes1
answer165
viewsI can’t fill a matrix
When I put fixed values in the size of the matrix I can fill it, but when I try to capture the values in matrices a message like this appears: The index was outside the matrix boundaries ` int a =…
-
1
votes1
answer2907
viewsError: System cannot find specified file [C#]
Win32exception (0x80004005): The system cannot find the file specified in System.Diagnostics.Process.Startwithcreateprocess(Processstartinfo startInfo) While trying to run a recently published…
-
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
votes2
answers1938
viewsGET service - System.Nullreferenceexception: 'Object Reference not set to an instance of an Object. '
I am acting in the creation of a service Get in ASP.NET Core, my project contains the following structure: Certidao.Data - Class Library Inside there is Dependences, Models: Sexo.cs and…
-
1
votes0
answers43
viewsHow to change the treeview + image c# . net
I want to change the treeview, follows the example below. In the image above to see what the + I am disproportionate to the name, I would like to change the size and together the design of +,…
-
1
votes1
answer279
viewsError handling exceptions - "Undefined object reference for an instance of an object"
public String IdentificarAcessoDAL(FuncionarioDTO acesso) { try { conexao.cmd.Connection = conexao.conexao; string recuperar = "SELECT CARGO.NOME_CARGO FROM LOGIN INNER JOIN FUNCIONARIO ON…
-
1
votes1
answer99
viewsHow to create an extension method for the type of a class in VB.NET
I’m creating a MVC structure that will work similar to the Entity Framework within a VB.NET project where I created an attribute called TableAttribute which will define the table and the schemas to…
-
1
votes1
answer161
viewsHow to access custom attributes of a property using VB.NET
I have a solution in VB.NET where I am implementing some custom Attributes. One of them is for properties, example: Namespace Attributes <AttributeUsage(AttributeTargets.Property)> Public…
-
1
votes0
answers31
viewsSignedxml in NET 2 vs. NET 4.5
I have a web application in Asp.net, which consumes a webservice in Delphi and that it uses a DLL created in C# to perform signatures. With the web application installed on IIS, it shows an error.…
-
1
votes1
answer144
viewsOutput Cache ASP . Net MVC
I am studying on the output cache in Asp . NET MVC to improve the performance of my application. From what I’ve seen it can be stored in many places like: · Any · Client · Downstream · Server · None…
-
1
votes2
answers923
viewsAccess object attribute passed as generic parameter
In my application I have a chained list class that takes a generic parameter, which is the type of value the list will store. In this case, I am passing as parameter the class Usuario, I need to…
-
1
votes1
answer821
views -
1
votes1
answer36
viewsScript to Save the Page and Change the URL, and Save the Next Page
Well, I have a problem that in my view is simple, but in practice is complex, I need a Script in which it Save several URL pages and change to the next URL, Example: www.exemplo.com/1 Save 1 Next…
-
1
votes1
answer62
viewsHow to force an event to occur from an extension method?
I am creating a C# application and I am using the interface INotifyPropertyChanged thus: public class Test: INotifyPropertyChanged { private int foo; public int Foo { get => foo; set =>…
-
1
votes0
answers19
viewsIF not entering condition
Debugging the system code I am maintaining, but I noticed that "if (_start + 15 >= _Count) Return;" does not allow the code to continue, it goes back to Return. What would be the suggestion to…
-
1
votes1
answer915
viewsHow to request via c#? Webrequest vs Httpclient
I have a project in . Net Framework 4.6.1, and in my research I concluded that I can use the class Webrequest to request other web services via backend. I wish I could make requests using any http…
-
1
votes2
answers211
viewsHow can I treat Interops with an Assemblyresolve for a Class Library (DLL) project
This example is from a Windows Forms project that works correctly. namespace PriDebug_v9 { static class Program { /// <summary> /// The main entry point for the application. ///…
.netasked 5 years, 9 months ago José Miguel Ferreira 21 -
1
votes1
answer48
viewsIf an object manipulated by a pointer is allocated in the heap, can it be collected by the Garbage Collector?
I am studying C# and I am in the pointers section. I understand that a pointer stores a memory address of an "object" (types by value and Array). The data stored by the pointer (the address) is in…
-
1
votes1
answer52
viewsHow to select a random string from a list in C#?
Basically, I intended to choose a Random Question from the 'Question List', and when I write the code, it gives me an error in the bold part (the one inside the **). private void EscolhaDaPergunta()…
-
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
answer73
viewsWhat is a "multi-target" Nuget package?
My question is about generating a "multi-target" Nuget package, what would that be? I know that the package is compiled in one version target, .Net Framework 4.5, Core 2.0, etc. I even researched…
-
1
votes0
answers95
viewsSNMP problem in C#
I am developing an application that performs collections SNMP on a given server. I am using the library SnmpSharpNet. I’m getting to do the normal snmpwalk in a certain OID. However, there is a OID…
-
1
votes1
answer104
viewsSalary Simulation in . NET
I am trying to perform a C# Salary Simulation by introducing a remuneration, but in the method INSERELINHAREMUNERACAO is going wrong. The mistake is: Invalid Procedure Call or Argument. In VBA works…
.netasked 5 years, 9 months ago António Dias 44 -
1
votes1
answer234
viewsWhat is and what is the difference between IIS Local and IIS Express?
What makes the "Create Virtual Directory" ?…
-
1
votes1
answer60
viewsZoom in graph C#
I have a line chart with values from 0 to 5 for Y in my application C#. As most of the time the enough values to be drawn are 2 to 3 I would like to zoom vertically. float atualdata_1, calibracao =…
-
1
votes0
answers33
viewsConvert Dynamic to another type
I need to convert a Dynamic variable to another type in Runtime. The type I want to convert is stored in another variable (I don’t know what type at development time). There’s something like this?…
-
1
votes1
answer55
viewsGetproperties() except Notmapped
I have a method that searches all the properties of my model, but I would not like to bring the entities that have as DataAnnotation the attribute NotMapped. Method private IEnumerable<string>…
-
1
votes0
answers19
viewsHow to add program to Explorer Contextmenu correctly? - VB . NET
I managed to add my program to the Xplore menu successfully, but now I can’t get the information about whether the user started the program normally or from the explorer. I even found this code: Dim…
-
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
answers29
viewsMediator vs CQRS vs Repository
Hello, I’m developing a migration to a new ORM, in . NET, from an application with a complex SQL database, many small tables between them. A very tight system. In order to better organize the…
-
1
votes0
answers44
viewsHow to publish an ASP.NET (.NET Framework) project without the iis dependency
I have a project working but with the dependency of IIS. In some researches I found the possibility of making the project self host. As in the link: http://www.macoratti.net/18/05/net_conc3.htm But…
-
1
votes0
answers200
viewsNullreferenceexception - Object Reference not set to an instance of an Object
A person is launching a proposal, and I found through the Iderro generated on the page that she is accessing this error below. But I can’t understand his motive, so help me?…
-
1
votes3
answers229
viewsConvert the string "5.541.00" to int in C#
What is the correct way to convert a string with the text "5.541,88" to int? I’m trying to do it this way: int valor = int.Parse("5.541,88"); But I can’t because it returns the error: Input string…
-
1
votes1
answer449
viewsCreating a modal with delete function . Net Core 2.0
Good evening, I would like help on a question of . Net Core 2.0, how can I create a modal of boostrap 4 with the delete function in the code below? My main problem is on how to recover and make the…
-
1
votes1
answer24
viewsFind Normalizedusername of Identity . NET core on the Azor pages
I need to display the user name on topbar. Razor by default provides a @User object as default but providing little user information. It has the name property but brings the username instead of the…
-
1
votes0
answers51
viewsHow to block part of a method to be processed only once per request with . net core
i have to increment a column in the database and this increment may depend on the situation, for example increment according to the user, I am using Jmeter to send 100 requests at the same time, but…
-
1
votes1
answer136
viewsCan static classes and methods be used in ASP.NET MVC without problems between user sessions?
I did a routine of login using cookies and as I’m always looking for this information, so you don’t have to be instantiating everywhere I use I left these static classes, my question is if there…
-
1
votes1
answer30
viewsChange foreground color in XAML Binding (not working)
I have a text that color should alternate according to the method check below: public Color VerificaAlarmes { get => ChecarLimites? AlarmColors: Color.Gold; } public Color AlarmColors { get { if…
-
1
votes0
answers43
viewsI cannot add . txt files in . tar(C#) . net framework 4.6.1
Good morning! I want to add the . txt files (as shown below) in . TAR [![insert image description here][1][1] but I’m not getting it. the file . TAR is created, but the files are not added. Follow…
-
1
votes1
answer383
viewsModal to delete Registry (.net core - javascript - Bootstrap)
I’m trying to use modal to delete a record from a table. By clicking on the delete button, I wanted to display a modal asking for confirmation for exclusion, so far so good, I was able to do, but go…
-
1
votes1
answer1061
viewsChange <span> text with jQuery+variable
I’m trying to change the text displayed by a span within a modal: <div class="modal-body">Deseja realmente excluir?<span id="nomecliente"></span></div> I’m using onclick to…
-
1
votes2
answers97
viewsPulling repeated data from the database to Datagridview
I’m working on a c# project where I have a form TelaInicio where there is a DataGridView where all bank information is loaded and for this I have created a method called CarregarGrid() in form…
-
1
votes1
answer114
viewsFilter words contained in Bindingsource
I need to filter in my DataGridView which has as the datasource one BindingSource (filtro_descricao). I need to search the lines for the text typed in textbox1 regardless of the order they are in…
-
1
votes1
answer111
viewsPopular a Combobox from the selection of another Combobox
I really have no idea how to do this, but if this is really possible it would be very helpful to me, I tried in some ways but none of it worked I have a ComboBox cboBusca where I select what I want…
-
1
votes1
answer37
viewsReorder Listbox with Drag and Drop
Good morning friends! I have a Listbox in my application C# Windows Form. I’d like a way to use the events Drag-n-Drop for reorder the items within the listbox the way the user wants it. Basically I…
-
1
votes1
answer30
viewsProblem with checkedListBox + drag-n-drop
Good morning, I have a problem with the component checkedListBox of my application C# Windows Form. In the following code I am using drag n drop to reorder items from checkedListBox, what is working…
-
1
votes1
answer37
viewsPanel that changes size C#
Good morning, I’m trying to do the following for my application Windows Forms C#. I have a Panel that by activating your event MouseHover, the panel expands its size and there inside the panel with…
-
1
votes2
answers174
viewsCombine TIFF files in C#
I’m trying to combine multiple TIFF files into a multipage. I am used Magick.NET but the end result is a TIFF with only the first page. I tested with a 10-page file but only got one. I think there…