Questions tagged as 'c#'

1
answer

How to retrieve via C # the page HTML generated with AngularJS?

How to retrieve the HTML code of a page that uses AngularJS to process some information and generate a chart? I was able to easily retrieve the HTML code using WebRequest as demonstrated in the example below, but the content (graphic) generated...
asked by 29.02.2016 / 15:08
1
answer

Error: "You must add a reference to assembly 'System.Runtime.Serialization'"

I'm having this error:    The type 'System.Runtime.Serialization.IExtensibleDataObject' is   defined in an assembly that is not referenced. You must adda reference   to assembly 'System.Runtime.Serialization,   Version = 3.0.0.0, Cultur...
asked by 09.02.2016 / 21:23
3
answers

How do I log in to a desktop application via a web application?

I have a web application developed with ASP.NET MVC and login by storing the data in the Session. I have another application, but desktop, which does some tasks that can not be done on the web, but this application needs to be authenticated w...
asked by 18.02.2016 / 14:24
2
answers

Modifying an item from a list shared by multiple threads

I have the following pseudo-code: public void Associar(List<Data> dados) { List<Task> tasks = new List<Task>(); foreach(dado in dados) { tasks.Add(AdicionarAsync(dado)); } Task.WaitAll(tasks.ToArray());...
asked by 22.06.2016 / 22:04
5
answers

Print string in reverse

Why can not I print this string in reverse? I know there is a possibility of using a simpler form, but I want to understand the error. static void Main(string[] args) { string frase = "Diego lima de Aquino"; for(int i = frase...
asked by 19.10.2016 / 15:37
9
answers

Best practice for if

Which of the two code options performs better? I'm going to display a very simple example, there's usually more code inside if . A) string mensagem = "OI"; if(exibirAdeus) mensagem = "Adeus"; B) string mensagem = ""; if(exi...
asked by 03.02.2014 / 12:16
1
answer

Select GridView line with checkbox

function Selecionar(elemento,cordefundo) { var Inputs = elemento.getElementsByTagName("input"); var cor = elemento.style.backgroundColor; //manter a cor default do elemento for(var i = 0; i...
asked by 11.10.2015 / 21:30
2
answers

Upload Image Asp net MVC

My question is this: imagine a scenario where I have a screen that has a form, and in this form there is also upload of images. Let's suppose I fill out the entire form, and select 3 images in input type file , when submitting, there in...
asked by 20.01.2016 / 05:30
1
answer

Replicate / Copy elements from multiple tables

I have the following situation: The user has defined an establishment, where it has filled data in two tables, and wants to replicate / copy the data all the same, changing only the id of the establishment. I have the tables: ThetableAcidImpu...
asked by 16.04.2014 / 11:03
1
answer

How to solve the medium trust problem in asp.net

I'm developing a website in Asp.Net MVC5. When I publish the site in LocaWeb and try to login with my user I received the message: Attempt by security transparent method 'Microsoft.AspNet.Identity.ClaimsIdentityFactory'2+<CreateAsync>d__...
asked by 30.05.2014 / 03:38