When you set
visible = false for a control, although the control is not rendered into the form. But its state is maintained with the help of
viewstate. So each time the form is loaded the value of TextBox2 is maintained in ViewState of the page.
in the above example if you set
EnableViewState = "false" for the control, you will not get the updated value.
<asp:textbox id="TextBox2" runat="server" visible="False" EnableViewState="false">0</asp:textbox>
Hope this helps. :)