Questions tagged as 'c#'

3
answers

C # Make an output of 2 columns of 2 different arrangements

If I have this ArrayList lista1 = new ArrayList() { "A", "A", "A" }; ArrayList lista2 = new ArrayList() { "B", "B", "B", "B" }; it is possible to achieve something like this from output A B A B...
asked by 15.05.2017 / 08:33
1
answer

Error consuming webservice

I have a webservice rest, now in c # I have a function that receives a json in string format and I send it to the webservice, but the webservice tells me that the json is wrong. Can you tell me if it's wrong? ///xs var exPrecioStock...
asked by 09.05.2017 / 23:44
1
answer

How do I get the context of my table in C # through entity Framework?

I am currently using entity framework 5, and what I want to do are queries, inserts, updates through entity framework. I already transferred my BD to an .edmx connection file in .NET. My current problem is that I want to do a test insert, but ac...
asked by 03.10.2018 / 18:38
1
answer

Customizing DataGridView

How can I solve this problem when it comes to customizing my DataGridView ? Try modifying default styles, the styles of each Row , and Header , but still appear the same. Any comments that can help are welcome. Pura...
asked by 18.09.2018 / 10:39
1
answer

How to fill an array of hashtable objects in C # (VS2008)?

I need to create an array that contains n hashtable () objects or that contains n objects. I do not know how to declare this array or arrayList in C # (VS2008) Hashtable myHT = new Hashtable(); Array myArray = // ¿ Como declararlo ?     
asked by 13.09.2018 / 12:43
1
answer

Object reference not set as an instance of an object. Runat="Server" ASP

My problem is this: They asked me not to put runat="server" to textArea1 . Then in the part of the code the label does not appear to me. I tried to trap the tag with the master.findcontrol() but it throws me a NullExcep...
asked by 12.09.2018 / 15:25
2
answers

How to access the properties of a daughter class from the parent class instance

Assuming I have the following classes class Vehiculo { public string Nombre { get; set; } } class Auto : Vehiculo { public string CantidadRuedas { get; set; } } and what I want to do is the following Vehiculo vehiculo = new Auto...
asked by 04.12.2018 / 20:31
2
answers

Problem datetime value null

It turns out that when I run my view, I get this error Now, my controller is this: public ActionResult contact(string txtNombreArchivo, string txtCantidadTarjetas, string txtNombreAfiliado, string txtBIN, DateTime dtpFechaVigenci...
asked by 04.12.2018 / 00:11
1
answer

Store values of a query in a variable

I am applying the following query to get the value of an existing field in a table and capture it in a variable. var captbarras = TextBoxLeerSerial.Text; string sqli = "SELECT codigobarras from articulo WHERE codigobarras='captbarr...
asked by 21.09.2018 / 16:04
1
answer

How to print from a DataGrind the current cell in which I am standing

I'm using this code but it does not work private void imprimirCeldaToolStripMenuItem_Click(object sender, EventArgs e) { r = new imprimirmanifiesto(); int pos = 0; bool a = true; try...
asked by 24.09.2018 / 23:54