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
answer109
viewsC# Function convert string to xml
I wonder how to convert a string with XML inline for a XML with tags, I’m using the XmlDocument, I have the following code: var MihaString="<MeuXML Info01="teste 0121245" Info02="2020-01-14"…
-
1
votes0
answers82
viewsHow can I make a program open a saved file on the computer without this program running?
Hello! I would like to share a question that I am having in a program that I am developing of the Windows Application type in C#. This is a notepad for my personal use. The operation of this…
-
1
votes1
answer61
viewsIs it possible to have more than one "post" route in a controller. NET?
I’m starting a C#. NET Core API project. When I create a controller like "API Controller with read/write actions" it creates the available actions. using System; using System.Collections.Generic;…
-
1
votes1
answer39
viewsRelationship Problems Entity Framework Core 3,
I’ll expose the code first, then explain the problem. Pupil.Cs using System.Collections.Generic; namespace SalaDeAula.Models { public class Aluno { public int AlunoId { get; set; } public string…
-
1
votes0
answers35
viewsProblem sending View information to Controller
I’m doing a simple CRUD on ASP.Net MVC and implemented a search box to search for a product in the database. But when I click search, the Viewmodel item passed in the Taghelpers is not sent to the…
-
1
votes1
answer23
viewsI can’t insert a Dropdown box in C# . Net Core, is there a type conversion error?
Error: Runtimebinderexception: Cannot implicitly Convert type 'Object' to 'System.Collections.Generic.Ienumerable<Microsoft.AspNetCore.Mvc.Rendering.Selectlistitem>'. An Explicit Conversion…
-
1
votes1
answer59
viewsCS0747 Error with C#declared
I have created a list that receives my command object powered by the fields of my Forms, my class: public class Comanda //Essa classe carrega tudo necessário para o pedido. { public int idComanda {…
-
1
votes0
answers263
viewsBulk C# and Sql Server NFE xml import
Good morning! I have an application with the following features: Windows Forms, C# Visual Studio Community 2019 Sql Server Express Windows 10 Pro About: I created the application in order to import…
-
1
votes1
answer64
viewsHow to select specific files in a folder?
I’m making a Console Application in C# which, given an array of file names it returns the address of each and adds them to a Dotnetzip Zipfile. Currently I code lies like this: string[] nomes = {…
-
1
votes2
answers133
views.Net Core 3.1 - How to use Enum to replace code string
Separate file: public enum LANG { NOT_SET = 0, ENGLISH = 1, PORTUGUESE = 2 } File in which I want to put Enum that is currently being validated with string: public bool Validate(StructuralData data)…
-
1
votes0
answers39
viewsIs it possible for an entity to have 2 N-to-N relationships using Entity Framework?
I have 2 models: Cliente and Empresa, which need to have registered addresses. I created another template called Endereço to make the relationships N for N, in which it stayed this way: public class…
-
1
votes2
answers49
viewsResult of the same account is different in VB and C#
I’m trying to use a formula that gives me the expected result in C#, when translating the code to VB.NET the result is completely different. I’m almost sure I did the translation correctly. I forgot…
-
1
votes0
answers49
viewsRelationship 1-1 and circular reference
I’m running a very simple test, where I have two entities with a 1-1 relationship between them: public class User { public int Id { get; set; } public string FirstName { get; set; } public string…
-
1
votes2
answers37
viewsEntity Framework -> How to find the largest table elements
I have the following tables in my base: Produto Id | Nome | Preco 1 | fone | 100 2 | copo | 50 3 | pao | 10 ProdutoStatus IdProduto | Versao | Preco 1 | 1 | 101 1 | 2 | 110 1 | 3 | 90 2 | 1 | 55 2 |…
sql-server .net entity-framework asp.net-core entity-framework-6asked 3 years, 8 months ago Guilherme Golfetto 743 -
1
votes1
answer90
viewsCORS policy . net core and angular 8
I’m having problems with CORS policy. I pulbligated a site on IIS and did not put host name (accessed by IP). When I put the host name (www.nome-do-site.com) the system stopped working and the…
-
1
votes0
answers24
viewsJquery Ajax does not display Object in the PUT method, using . net mvc
I own the Object var obj = { nome: "Felipe", idade: 23 } I created an ajax call by jquery like this: $.ajax({ url: 'ConfigCode/UpdateOptionsStatus', // route controller na web type: 'PUT', data:…
-
1
votes1
answer104
viewsURI 1259 - Increasing and Decreasing Odd Pairs
I’m solving that URI Online Judge challenge. But my code has had the answer "Time limit exceeded", and I don’t understand exactly why. Follows code below: using System; using System.Linq; namespace…
-
1
votes0
answers34
viewsFluent Validation Notnull() method does not work
Hello! I have developed some user registration validations that follow: using FluentValidation; using System.Linq; using System.Text.RegularExpressions; namespace…
-
1
votes0
answers23
viewsBy inserting data generated in Behind code through the model without having to DISPLAY in the view, is it possible?
Look I’ll start by saying that I know what I’m trying to do is break a taboo of the MVVM standard, but it is not possible that there is no other way to do this, it is common to have q create new…
-
1
votes1
answer76
viewsGenerate csv file in Excel standard with Csvhelper C#
I created a project to generate a . csv file (which will be used in Excel). So far it is working normally and is being generated in the format "Excel . csv", but the problem is that when opening the…
-
1
votes1
answer35
viewsHow to make an internal calculation in Textbox?
I need to calculate a value entered in Textbox and this value I enter is multiplied by 9,81. So all the numbers I insert in this Textbox will be multiplied by 9,81 and you will have to show me the…
-
0
votes1
answer131
viewsWhat are the advantages of using ASP.NET’s formView control?
What are the advantages of using the control formView of ASP.NET?
-
0
votes1
answer218
viewsHow to change settings for a Binding Source?
How do I run an application that is linking (Binding) to a local database to use Binding on any machine.
-
0
votes1
answer1278
viewsHow to fill a Listbox using multi thread in VB . NET?
In a Windows Form Application I have a List Box that is filled from a list of IP’s. It works like this: there is a text file (config.eep) which contains a number of IP’s, by pressing a button to…
-
0
votes1
answer257
viewsRenderaction does not consider my validations in ASP.NET models
Renderaction stopped considering the fields marked as [Required] on my models. Example of one of the models: private uint IdNews { get; set; } [Required(ErrorMessage = "Defina o título.")] public…
-
0
votes1
answer2060
viewsOCI-22053: overflow error - C#
I am developing a web application in MVC with C#. I made a method that makes a select in my bank oracle and with the value returned I fill a DataTable. But it returns an error the moment I run…
-
0
votes1
answer119
viewsHow to authenticate on a server site?
There is a login area on this website "https://id.nintendo.net/login" and would like to know if it is possible to log in via . NET or via client using post or something like.…
-
0
votes1
answer159
viewsSum of a Sqldatasource result
I am developing a reporting system to control calls and need to take the result of a query and make a sum that brings me the total number of calls per sector of a certain number. I’m using Stored…
-
0
votes1
answer1549
viewsORA-00942 TABLE DOES NOT EXIST error occurring in System.Data.Oracleclient. VB.NET
I have an application in Vb.net using .Net Framework 2.0. Below is an excerpt from my application code: strComando = "SELECT CD_LOCALIDADE, NO_LOCALIDADE FROM COPAGIS_GDB.MUB_LOCALIDADES WHERE…
-
0
votes2
answers1057
viewsrun/call a page remotely
I want to run a remote page, I don’t care what this page does, I just need to run it and wait for it to load 100% to run another, and so on. I don’t need to recover any information from that page.…
-
0
votes2
answers200
viewsHow do I get Bitrate Mode from a C#MP3?
The audio I have is CBR (Constant bit rate), VBR (Variable bit rate) or AVR (Average bit rate), I tried using ffmpeg, only it does not return me the bitrate mode information?
-
0
votes1
answer351
viewsQuery Dynamic Linq
I need to create a dynamic query, where the DayOfWeek.Monday is dynamic, as I can define it? DataClassesPDataContext pe = new DataClassesPDataContext(); var qry = from p in pe.R join q in pe.V on…
-
0
votes1
answer1749
viewsWebservice REST POST error request
When making the request for POST is returned me this error message: O servidor remoto devolveu um erro: (400) Pedido incorrecto. Iservice finds - if closed this way: [WebInvoke(Method = "POST",…
-
0
votes2
answers634
viewsHow to group text file according to first line parameters in C#?
I was able to join several text files of the same directory in a final text file, grouping the equal codes and adding their respective amounts, using the following code (credits to friend Vitor…
-
0
votes2
answers3488
viewsCustomer Facilities, WCF or Web API?
I need to create a web service for data insertion in a database that requires validation to ensure data integrity. I have as a requirement, to facilitate the use of my "clients". Therefore, I must…
-
0
votes3
answers558
views -
0
votes2
answers94
viewsContinuous integration TFS/Azure and Connection string in app.config
I have a project composed of two subprojects, one of those subprojects is a Class Library, responsible for database connection activities. I am using Entity Framework as a ORM tool. In the archive…
-
0
votes1
answer216
viewsHow to know if a function has been called by another form?
How to know if a function has been called by another form? For example: In my Form 1, I have a method that calls another form: private void btnFormulario2_Click(object sender, EventArgs e) {…
-
0
votes1
answer159
viewsString conversion problem in Timespan
In the system I’m developing a user sends me a TimeSpan via Post, but when I catch the String that should be the TimeSpan and apply a TimeSpan.Parse he gives the error: "Could not parse Timespan…
-
0
votes1
answer91
viewsVisual Studio 2010 Professional does not display Visual Studio Solutions
Visual Studio 2010 Professional which has in Add-> New Project-> Other Project Types does not display Visual Studio Solutions. I saw several posts on the internet indicating to solve the…
-
0
votes1
answer598
viewsHow to insert values inside a key using List and JSON
I’m trying to do something that gives me a way out of this: [ { "Nome": "João", "Comprou": [ "Carro": "Sedan", "Preco": "12000", "Moto": "Honda", "Preco": "8000" ] } ] For this I use List and to…
-
0
votes1
answer720
viewsAdding more than one string to a List
I have a customer registration system and I am trying to add products to registered customers. For the registration list I have the following: public class Cliente { public string Nome { get; set; }…
-
0
votes1
answer134
viewsImplicit type conversion error
Error 1 Cannot implicitly Convert type 'Cursocavancado.Client' to 'string' C: course Cursocavancado Cursocavancado Form1.Cs 47 31 Cursocavancado Follows the class namespace CursoCAvancado { public…
-
0
votes1
answer362
viewsReference to styles and scripts in Master.Page using Resolveurl
In Master.Page I make references to styles and scripts that will be inherited by other pages through Resolveurl. <script src="<%# ResolveUrl("~/") %>Scripts/jquery-1.11.1.js"…
-
0
votes2
answers483
viewsMatch content of two objects
Use the method below to update a given table: public int alteraBem(tb_bens itemBem) { try { using (GestaoAtivoEntities db = new GestaoAtivoEntities()) { var bem = db.tb_bens.Where(v =>…
-
0
votes0
answers543
viewsQuery Active Directory data in Sql Server
I have services (WCF) that do searches in Active Directory to provide data to various applications that use Microsoft Membership Provider, and also need some of this information in some queries in a…
c# .net active-directory sql-server-2008 asp.net-membershipasked 9 years, 10 months ago Rafael Carvalho 246 -
0
votes2
answers1026
viewsMove image (Picturebox) in form
How to move an image in a windows form. I used the following code: private void button1_Click(object sender, EventArgs e) { int tamanhoFundo = picFundo.Width; int x = myPic.Location.X; int y =…
-
0
votes1
answer381
viewsHow to fill Textboxes?
I wouldn’t want to use several if's to control a method of mine, unless there is no way to do it without the if's. I write in a list, the return of the BD that may or may not have banking…
-
0
votes1
answer1699
viewsHow to save the same object in the database using entityFramework . net MVC?
I need to update a table in the database using entityFramework, because when I update a value of a field and have it saved ,. Please someone has a way to fix this?? grateful…
-
0
votes2
answers822
viewsHow to return more than one database Entity in a LIST?
I have two entities, CATEGORY and TRANSACTION, on the bench I also have these two tables. TABELA: CATEGORIA CHAVE: ID TABELA: TRANSACAO CHAVE: CATEGORIA_ID When performed a select for Entity…