Questions tagged as 'c#'

1
answer

How to close the program by pressing the

How can I close the program by pressing ESC? Even if it has a MessageBox or something else stopping it? I tried this way but could not: private void Form_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Escap...
asked by 28.05.2018 / 03:20
2
answers

Call Method C #

Hello, I have a project in progress where I have a staff registration screen. I need to leave the border of TextBox red if there is anything wrong in filling it up. I tried in many ways and none gave the result I expected. I found this co...
asked by 08.04.2018 / 23:01
1
answer

Serealize a JSON String C #

I want to set up a JSON String, but I can not create the class the way I need it, I can get information up to the first level, but I can not create subkeys. For example I want the string to be { "nome": "Nome", "familia": { "pai"...
asked by 13.03.2018 / 12:49
1
answer

Call action Get that returns a view by jquery ASP.NET MVC [closed]

I need to open the view create when I click on a button, how to do this for Jquery?    Button <div class="col-md-3"> <button id="btnNovo" class="btn btn-info form-control" style="width: 200px"> Novo </button>...
asked by 24.10.2017 / 16:59
1
answer

TLS 1.2 Protocol CT-e 3.0 and NF-e 4.0

I am developing the CT-e 3.0 and the NF-e 4.0, in which it cites the need to change the security protocol from SSL to TLS 1.2 with the deadline of 04/02/2018. In the receiving webservice you have no information about the protocols, the docume...
asked by 17.10.2017 / 14:47
1
answer

How to return a DataReader C #

I know I'm doing it the wrong way. However I would like to know if it is possible within what I am trying to return a dataReader.
asked by 23.10.2017 / 18:26
1
answer

How can I turn text content into integer in C #

How can I get a .txt file and transform it into an integer string? My program has to get the array that is inside the file .txt and put inside an array in the program so that I can manipulate the data inside the array. The part...
asked by 22.10.2017 / 16:45
3
answers

INSERT command error in Visual Studio

I have a web application in visual studio where I am getting the following message whenever I try to give an insert command    System.Data.SqlClient.SqlException: 'An explicit value for the identity column in table' C # code: SqlDataSou...
asked by 17.11.2017 / 17:52
2
answers

How to Increase webform timeout time

How to increase the timeOut time, my session is falling around 5 min, it is not in the connection string. Asp.Net AspNet Identity Authentication <sessionState mode="InProc" timeout="20"/> <customErrors mode="Off"/> <a...
asked by 22.11.2017 / 11:11
1
answer

How can I add Headers to an HttpWebRequest

I'm using var httpWebRequest = (HttpWebRequest)WebRequest.Create("https://test.net"); To create a connection to the server and would like to know how I can add headers to httpWebRequest ?     
asked by 28.08.2017 / 17:20