Questions tagged as 'c#'

1
answer

How to clean textboxes converted to Double

I have this event of textbox amount sold : private void txtcantidadvendida_Validated(object sender, EventArgs e) { double existencia, venta; existencia = Convert.ToDouble(txtexistencia.Text);...
asked by 02.07.2017 / 21:11
1
answer

Foreach datagridview row update stock

It is possible to update a stock with stored procedure using a foreach that is, I have this procedure execution: SqlConnection conec = new SqlConnection(); SqlCommand cm = new SqlCommand(); cm.Co...
asked by 06.08.2017 / 20:32
1
answer

Object sender and take text

I have 3 different buttons but I want that when clicking on any of them, the text that this brings is saved in a variable by means of the object sender One of the buttons would be, for example, the following: <asp:Button ID="Btn_e...
asked by 28.06.2017 / 14:55
1
answer

KNOW IF A VARIABLE EXISTS

I want to know if a variable has already been created. I have an IF that instantiates a class and a variable is initialized. if (nivel == "1") { HtmlGenericControl li = new HtmlGenericControl("li"); HtmlGenericControl a = new HtmlGenericContr...
asked by 26.10.2018 / 18:36
1
answer

Problems when doing update in GridView with asp.net

I am trying to perform an update with the function of RowUpdating of the same Gridview by giving it in update , this throws an error and does not continue the execution, I have tried everything, and I searched for the solutio...
asked by 22.05.2017 / 17:17
3
answers

Variable Error Null in C # [duplicated]

Hi, I have the following code and when I run it I get the error that the variable facturaedit.Detallefacturas[i].IDDetalleFactura is Null. code: public ActionResult Edit(int id) { //Instanciamos el modelo (los modelos sie...
asked by 20.06.2017 / 20:07
2
answers

Problem when selecting node value in XML document

I need to assign the value of an element of an XML document to a variable, specifically the value of the name element Clave , I wrote this but it does not work since it does not find the node because the function does not return any value....
asked by 28.03.2018 / 02:22
1
answer

Problem with If and TextBox - C #

My if does not evaluate correctly, I want you to verify that the textbox are not empty or that textbox1 or textbox2 is not "var" , otherwise mark error. if (textbox1 != "" || textbox1 != "var" && textb...
asked by 15.05.2017 / 19:37
1
answer

Get the customer's date, not the "SERVER" in C #

I am trying to capture the date of a client LOG IN on my portal. when using DateTime.Now I am capturing the time of the server, what I need is to obtain the time of my client, since the server is in a country where the schedule does not m...
asked by 12.07.2017 / 17:51
1
answer

Table inside GridView cell

Can a Table be created dynamically within a cell of the gridView ? I know that within a Table you can put in the new cells table , but could you do the same with a gridView ?     
asked by 12.04.2017 / 13:18