Since you are tagging this as ASP.NET, I will assume this is website code.
In which case, no it won't work like that. Variable values are not preserved between runs, they are destroyed when the page load (or postback processing) is completed.
If you want to preserve a value, you need to look at either storing the total in a Cookie (on the client) or the Session (on the server) and retrieving it before you start working.
Cookies[
^]
Save in Session[
^]
Read from Session[
^]
BTW: You do realise that doing all your math operations in the codebehind will create a rather slow calculator, don't you?