Questions tagged as '.net'

1
answer

Pass TempData

Good morning, I have the following problem, I need to pass a variable to another controller and I'm trying to do this for TempData, it follows the code: var user = User.Identity.GetUserId(); var getUser = db.AspNetUsers.FirstOrDefault(x =>...
asked by 20.02.2017 / 20:00
1
answer

show exception error on callback AJAX

I have this ajax call: $.ajax({ method: "GET", url: "/Shipper/getFullAddress", data: { postalCode: value }, dataType: 'json', success: function(data) { $('#AddressStreet').val(data.AddressStreet);...
asked by 09.03.2017 / 15:21
1
answer

A3 Digital Certificate with C # X509Certificate2

When I'm issuing MDF-e / NF-e / CT-e (any tax document) using the A3 certificate, I'd better set the pin via code using the method here /// <summary> /// Classe para passar o Pin Code por baixo do código /// (a caixa de dialógo pedindo o...
asked by 26.01.2017 / 18:25
1
answer

Reboot a variable, or re-create it?

In terms of performance, which is more preferable? Are there other differences between the two modes, other than performance? Reboot a variable multiple times? Private Sub Metodo() Dim MeuTipo As Tipo For i As Integer = 0 To 100...
asked by 20.12.2016 / 22:42
1
answer

How to make the compiler recognize the. as decimal separator?

I made a simple C # code that gets a real number but only recognizes the "," as the decimal separator. When I do receive numbers that use the "." as a separator it ignores the point. For example, if you send "2.0", it receives "20". Here is the...
asked by 12.12.2016 / 04:00
1
answer

Working with anonymous type

I have the following code snippet: var filter = new { categoria = 1, cond2 = foo, ... }; p = new ProdutoBusiness().listarProdutos( filter ).ToList(); I wanted to work with this anonymous type as a parameter to filter, but I do not know how...
asked by 12.12.2016 / 21:07
1
answer

Capture error when button is pressed

I want to make a button that when clicked is shown the SQL Server information and say that it is connected (have to configure the file in the XML Configuration File) See below the code: public class Functions { public static void conn()...
asked by 15.11.2016 / 20:34
1
answer

Generate the primary key in the application or keep it as an auto incremental?

Should I set the primary key of my table to auto_increment or set it as numeric, generating the key within my application? Contextualization I'm developing a C # application and testing it in an Access database, and then passing it...
asked by 13.11.2016 / 17:37
1
answer

Nested for thread conversion

I have the following% nested for that runs the entire length of a bitmap image in C #. I would like to run the second for threads to run parallel. Bitmap alterado = new Bitmap(original.Width, original.Height); //Convertendo para to...
asked by 01.12.2016 / 19:11
1
answer

Understanding structures in the AssemblyInfo.cs file

Taking a look at the AssemblyInfo.cs file of a C # project I came across some structures that I am not recognizing. These are the lines: [assembly: AssemblyTitle("")] [assembly: AssemblyDescription ( "" )] [assembly: AssemblyConfigurati...
asked by 02.10.2016 / 00:08