Ver Mensaje Individual
  #5 (permalink)  
Antiguo 13/04/2016, 18:40
jmfmagnum
 
Fecha de Ingreso: julio-2014
Mensajes: 116
Antigüedad: 10 años, 8 meses
Puntos: 1
Respuesta: Sumar de a uno con boton

Aqui esta arreglado y funcional por si alguien lo necesita, gracias por la ayuda

Código ASP:
Ver original
  1. using System.Linq;
  2. using System.Web;
  3. using System.Web.UI;
  4. using System.Web.UI.WebControls;
  5.  
  6.  
  7. public partial class _Default : System.Web.UI.Page
  8. {
  9.    
  10.     protected void Page_Load(object sender, EventArgs e)
  11.     {
  12.        
  13.     }
  14.     protected void Button1_Click(object sender, EventArgs e)
  15.     {
  16.         int numero1 = Convert.ToInt32(TextBox1.Text);
  17.         int numero2 = Convert.ToInt32(TextBox2.Text);
  18.         int resultado = numero1 + numero2;
  19.  
  20.         int cantidad = int.Parse(TextBox3.Text);
  21.         cantidad++;
  22.         TextBox3.Text = cantidad.ToString();
  23.        
  24.         Label1.Text = resultado.ToString();
  25.        TextBox1.Text = String.Empty;
  26.        TextBox2.Text = String.Empty;
  27.      
  28.     }
  29.  
  30. }