Questions tagged as 'c#'

2
answers

Simulate a Click in WebBrowser using C #

I would like to know how to do a click on a button on a website even by clicking on such a debug web element in the browser itself. I'm using the C # webbrowser component I have tried some methods here, but without success, even using GetE...
asked by 23.07.2014 / 20:25
1
answer

How to use LEAD and LAG using a condition

My question is, if I can use LAG and LEAD, using a condition in the query, for example: I have the zip column .. I want to get the value of the next line, and the value of the previous line in that same column. I'm working with C # and SQL...
asked by 29.04.2014 / 18:38
2
answers

Receiving code 200 when it should be 404

I created an ASP.NET MVC 5 application by adding the following code snippets: Web.config <system.web> <customErrors mode="On"> <error statusCode="404" redirect="~/Erro/Erro404"/> </customErrors> </system...
asked by 01.05.2014 / 18:39
1
answer

Retrieve the ID of a DataTable within a GridView

I'm trying to rescue the ID from my client that is in GridView , but I'm using DataTable to fill GridView . DataTable public DataTable SelecionarDT() { objDAO = new ClienteDAO(); DataRow dr; DataTabl...
asked by 28.04.2014 / 17:00
1
answer

Generate PDF with specific font

I have a report that already works. I need to change the font to "Garamond" (already installed). The references found talk about other more flexible properties, for example, changing the font "per family" tuto 1 , or by removing a watermark (wh...
asked by 27.08.2014 / 20:18
1
answer

Save entities with one-to-many relationship using WebAPI

I'm starting a WebApi project and I came across a situation that I did not know how to set my Controller class. I have the following structure public class Artigo { public int ArtigoId { get; set; } public int AutorId { get; set...
asked by 29.04.2014 / 19:29
1
answer

Error writing to MongoDB using Parallelism in C #

I have a collection in Mongo that has subdocuments, so I read xml files and write them to MongoDB. Each xml file is a document in Mongo. My classes public class Cabecalho { public Cabecalho() { Operacoes = new List<Operac...
asked by 04.09.2014 / 13:38
1
answer

Find information on more than one table

In my project I currently have 3 tables: Students, Occurrences and Users. In them I have views and controllers . So far so good. My relationships are: Students & Occurrences (1, N) / Occurrences & Users (N, 1). My problem is that in ac...
asked by 14.11.2014 / 03:40
1
answer

The type initializer of 'X' triggered an exception

When I try to run the line below, I get the following error message: An exception of type 'System.TypeInitializationException' occurred in Program.exe but was not handled in user code.      Additional information: The initializer of type 'P...
asked by 06.11.2014 / 21:56
1
answer

System.OutofMemoryException - Parser for large files

I created a simple grammar to interpret a file whose format is very similar to a JSON. However, when I try to parse the file I get the Sytem.OutOfMemoryException exception. This is because of the size of the file I'm trying to parse. The...
asked by 06.11.2014 / 19:37