Questions tagged as 'c#'

1
answer

Progress bar on windows taskbar c #

I'm developing an application that will send email to multiple clients. I would like to display the progress of the submission even with the form minimized. I would like to do the same way Windows 7 copies files, in which even the copy window...
asked by 07.12.2014 / 13:08
1
answer

Connect to SQL Server on remote server

I need to connect to a SQL Server service on a remote server via SQLConnection, C #. Initially, it was giving the server could not be found, but I solved this by modifying the system32 hosts file, enabling exception on the server firewall and en...
asked by 02.02.2016 / 14:57
1
answer

Search does not recognize .zip file as a valid file inside a folder

I did this routine to delete empty folders, with no files inside. foreach(var folder in folder_new) { if (Directory.Exists(folder)) { if (Directory.GetFiles(folder, "*", SearchOption.AllDirectori...
asked by 07.03.2016 / 13:44
1
answer

What are the differences in performance issues when using querys with EF vs ADO

What is the difference in performance when using the query methods the base SqlQuery<TElement> and ExecuteSqlCommand of EntityFramework in relation to directly using ADO.NET ? If there is a significant difference in perf...
asked by 06.04.2016 / 13:54
1
answer

Pass object to WebService

I'm starting development using WebService + Windows Form and I made some silly methods passing parameters, however, I came up with the idea of passing an object as a parameter where the Web Service would return me a string either concatenating e...
asked by 01.05.2016 / 18:02
1
answer

Error; The connection has not been closed. The current state of the connection is opened SqlServer 2016

I'm creating an application in Visual Studio in C #, and connecting to sqlserver on Server Explore was all correct in connection testing. This is my connection string: return "Data Source=DESKTOP-58ASAQP\MSSQLSERVER16;Initial Catalog=Contro...
asked by 17.04.2016 / 23:06
1
answer

How to decrease byte array size representing an image

I have an array of bytes in base64 that is in a String in C #. It represents an image. The size of the String is between 50 and 80 thousand characters. I would like to know if you can reduce this size, compressing and removing the quality of the...
asked by 29.04.2016 / 01:38
1
answer

How to validate USB Serial port name

I'm doing the rationalization of a scale in C #, I can communicate with code all right, but when I connect, I need to specify the port name, I have other devices connected and the port name varies from machine machine. Can anyone help me val...
asked by 10.08.2018 / 19:25
2
answers

How to remove mascara from the field before calling the controller with asp net MVC

In my registration form I have a CNPJ field with the mask set via jquery $("#cnpj").mask("99.999.999/9999-99"); however the value is arriving in my formatted controller, in my database this field is float, is there a way to handle this w...
asked by 04.11.2015 / 00:47
2
answers

Downloading files from FTP

I need to download txt files that are in an FTP, I tried to use the following code apprehended below for this but it does not do what I need. The first parameter of the DownloadFile method is the URL I have, the second parameter is required b...
asked by 18.11.2015 / 14:01