using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class _Default : System.Web.UI.Page 
{
    public void test(object sender, CommandEventArgs e)
    {
        int arg, num;
        arg = System.Convert.ToInt32(e.CommandArgument);
        num = System.Convert.ToInt32(TextBox1.Text);
        if (e.CommandName == "Add")
            num += arg;
        else
            num -= arg;
        TextBox1.Text = num.ToString();
            
            
    }

    protected void Page_Load(object sender, EventArgs e)
    {
        
    }
    protected void Button1_Command(object sender, CommandEventArgs e)
    {
        test(sender, e);
    }
    protected void Button2_Command(object sender, CommandEventArgs e)
    {
        test(sender, e);
    }
}
