Questions tagged as 'c#'

1
answer

How to import excel data considering the first row that do not have a header in C #?

To be able to import data from excel I use the following code: Foldername = Server.MapPath("~/Importados/"); fileuploader.SaveAs(Foldername + filename.ToString()); String conStr = ""; switch (Extension) { case ".xls": //Excel 97-03...
asked by 01.08.2018 / 06:54
3
answers

validate login (login) c #

I have a login form (user, password, permission) that has a combobox, which allows you to choose what type of user to start the session, depending on the type of user selected, validates the data from 2 different tables, but it gives me error:...
asked by 02.08.2018 / 21:38
1
answer

How to add rows and columns to a DataGrid in Compact Framework 3.5

I'm new programming in C # and I'm making an application for a Windows 7 embedded device in which a DataGrid will be used but I can not find the way to add data and columns, in the 3.5 framework if the following code works for me: mydatagrid.C...
asked by 12.10.2018 / 21:43
1
answer

Cultural reference C # is not supported

I've been having problems wanting to install the published program, being that compiling and running directly from Visual Studio 2015 works fine here is the error that I generated when installing the published program INFORMACIÓN DE VERSIÓN...
asked by 23.07.2018 / 04:46
1
answer

Itextsharp - Name of PDF depending on variable

I currently have a code with iText to create PDF with a fixed address in this case: PdfWriter writer = PdfWriter.GetInstance(doc, new FileStream("C:/Atreus-Export/presupuesto.pdf", FileMode.Create)); My question is how can I make the PDF na...
asked by 04.09.2018 / 14:34
1
answer

Leave image by default ASP .NET

Good morning. You see, I'm doing a project that includes a profile, and that profile has the option of adding an image. The issue here is that it saves the path of the image in BD and the image in the folder. But when creating a new user, the Im...
asked by 18.05.2018 / 16:47
1
answer

Digital signature of a PDF with C Sharp and itext

In my work they use digital signatures to validate PDF files that are then delivered to those who request them (those who do not belong to the company), so the PDF should show the signature with the data of the signatory. The signature is bei...
asked by 03.03.2017 / 15:49
2
answers

C # - create a class that implements IDispose

please collaborate on the following: I have a Class class with N attributes: public class Clase { private string atrib1; private int atrib 2; } I want that when I use the class I can do (I think for a better management of resourc...
asked by 08.03.2017 / 19:49
1
answer

Use of delegates in C #

I have the following code, taken from a Unity script to play video: public delegate void VideoEnd(); public VideoEnd OnEnd; Then, when a video ends, the following event is generated: if (OnEnd != null) OnEnd(); What I need, is (not...
asked by 13.03.2017 / 18:13
1
answer

Migraciones assign value by Default

I am working on a project with C #, Entity Framework and MySQL.  I wanted to know if you could help me with a "problem" I'm having with migrations. I was working with MySQL version 5.6 and go to version 5.7, the problem (if you can say problem)...
asked by 18.04.2018 / 17:55