Questions tagged as 'c#'

1
answer

Select the contents of a TextBox by taking the focus

Is there any way that when the focus is positioned on each type control TextBox contained in a form, select the text contained in these? I mean if there is any way to do this without having to program the ENTER event for each text box,...
asked by 20.04.2017 / 19:35
1
answer

How to pass excel data to a SQLServer table with visual c #?

I have the following code on a button, but when I run the program I get the following error:    Format of the initialization string does not conform to specification   starting at index 54. no controo argument exeption: Here is the code...
asked by 19.04.2017 / 16:34
1
answer

Export from datagridview to excel certain columns

I have a question. I have this code for filling out a datagridview, which gets the data from an excel document. string constr = (@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + textBox1.Text + ";Extended Properties=Excel 12.0 Xml;"); O...
asked by 18.04.2017 / 16:23
1
answer

Create new excel document with asp.net from a template

I have to fill out a report in excel in which they ask for my name and ask some questions in which I must qualify from 1 to 5 my experience as a user, but I can not modify the original file so I have to create a new document excel from the docum...
asked by 12.04.2017 / 12:18
3
answers

Force date format in datagridview

Good afternoon: I have a Dgv with a cell that contains the Date, In the Load of the Form I do the following: dgvContratoRenov.Columns[14].DefaultCellStyle.Format = "d"; When executing the Project, the Date appears well (Ej: 05/04/...
asked by 15.04.2017 / 00:46
4
answers

Argument errors in C # [closed]

Hello, I am modifying a small program that checks the usb that I have connected to my pc and then I will include a function that I will clean (I still need to implement it) if it is damaged. The code is as follows: using System.Reflection;...
asked by 11.04.2017 / 19:54
1
answer

provider: SQL SERVER Interfaces, error: 26 - Error searching the specified server or instance

I'm a bit new to this and I have a problem. I have created a system with the basic operations, add, modify, delete and search. This system is made in C # with the Visual Studio 2013 program, the database is created in SQL SERVER 2008. It is all...
asked by 27.04.2017 / 23:52
1
answer

How to convert a MySQL query to JSON in C #

I would like to know how to convert the result of a MySQL query to JSON in C # I do not have much knowledge in the following, but I would like the result of the query to be saved in JSON. public class WebService1 : System.Web.Services.WebSe...
asked by 23.05.2017 / 01:09
1
answer

c # pass data from one class to another

Good! I had done an exercise where I created a button for each file that I read in an xml.In the code that I leave down in line 4 I pass the game data to the init of another class, and then in the other class I'm doing what I want with that data...
asked by 09.04.2017 / 00:42
1
answer

Object reference not set as an instance of a Windows Forms object

Good afternoon, I have a problem with this code since I am trying to load a datagrid by means of an object from which I obtain records from a table in sql, when executing it it shows me the error Object reference not established as instance of...
asked by 06.04.2017 / 23:11