Questions tagged as 'c#'

0
answers

Conversion failed when converting the varchar value '@userID' to data type int

The error is what is in the title, conversion char to int. "Conversion failed when converting the varchar value '@userID' to data type int." Thanks for any help and if you have any tips on good practice, it's even better, because I'm new to this...
asked by 10.04.2018 / 20:48
0
answers

Cast to decimal in LINQ?

Since there is no Convert.ToDecimal() in SQL language, how could I transcribe a as decimal(18,2) in LINQ ? I've tried through decimal.Round() but it's not working. I have the following query in SQL : SELECT [nu_a...
asked by 26.04.2018 / 21:04
0
answers

My function is not checking the IF condition is already going straight into ELSE [closed]

private int dia; private int mes; private int ano; public bool GravaData(int d, int m, int a) { if ((d > 0 && d <= 31) && (m > 0 && m <= 12) && (ano > 0)) {...
asked by 27.04.2018 / 06:26
1
answer

Add dynamic gridview checkbox

I'm adding the gridview fields via code, but the checkbox does not appear, instead of the checkbox, it appears: "System.Web.UI.WebControls.CheckBox" Here's how I'm doing: CheckBox check = new CheckBox(); if (Session["dt1"] != null) {...
asked by 03.05.2018 / 19:30
0
answers

Validate user token of multiple applications in a single OAuth2-based authentication WebAPI

I am in the following scenario: I developed an API that is only used for authentication and authorization of company users, which I am calling SecurityAPI. All services work as expected and the API is based on OAuth2. In the company I have...
asked by 27.03.2018 / 15:33
1
answer

Accessing via curl

I have the following challenge: Log in to a site with the following data: POST */kodoreq.php HTTP/1.1 Host: eofclub.in Cookie: logado=sim User-Agent: Lynx/3.15 usuario=desafio&senha=987654321&submit=sim I've tried it in several...
asked by 20.04.2018 / 15:35
0
answers

Performance - Helpers

I've seen several times programmers sticking the helper in the view, instead of the html. I agree that there are cases that you actually "save characters" using them, but, and in relation to performance? I researched it but did not find it cl...
asked by 23.03.2018 / 17:40
0
answers

Make sure the controller has a parameterless public constructor

I'm getting this error after giving deploy(AWS) of my WebApi . LOCATION WORKS PERFECTLY .    <ExceptionMessage> An error occurred when trying to create a controller of type 'LivroController'. Make sure t...
asked by 23.03.2018 / 20:52
1
answer

Method to convert file into UTF-8

I have a class AndroidDecompress that takes AndroidManifest.xml and transforms into xml to be read, the problem that it only converts the file that is in Unicode of version 2 of AndroidStudio now with version 3 it is coming in UTF- 8 and I can n...
asked by 06.04.2018 / 20:35
0
answers

Doubt of how to make a TRIGGER bar in OXYPLOT

I developed an oscilloscope with PIC and C # everything is working, however I should now implement a TRIGGER, I will put an EXAMPLE image below, could anyone give me a hint how to implement in OXYPLOT? I have no idea how to stop the signal by va...
asked by 08.04.2018 / 16:32