It's difficult to tell what your code is meant to do, what it does is tries to confuse at every step...
Some rules for you:
1) If something is a string, there is no point in calling ToString on it - it won't do anything useful. TextBox.Text is a string already - leave it alone!
2) Pick a method to convert from string to int, and stick with it. Using two different methods that do the same thing, is pointless and confusing.
3) Don't write code that undoes the previous line with the next - there is no point is assigning a value to total1 in one line, if you are going to overwrite it in the next.
So, your code, tidied up a bit, and with redundant code removed:
int total1 = 0;
int total2 = 0;
protected void btnAdd_Click(object sender, EventArgs e)
{
total1 = int.Parse(txtAns.Text);
txtAns.Text = string.Empty;
}
protected void btnEqual_Click(object sender, EventArgs e)
{
total1 = int.Parse(txtAns.Text);
total2 = total1 + int.Parse(txtAns.Text);
txtAns.Text = total2.ToString();
}
However, I don't think that this does what you actually want to to do.
I think what you want to do is keep a running total, and add to it each time, somehow. But I'm not sure exactly what you are trying to do. Care to explain?