x
will not be persisted. Upon each request, x
will be initialised to 0.
Use, for example, session state to store the value of x
e.g. Session["x"] = x;
As for the label text, ASP.NET will store that inside of ViewState, which persists control values on each request. You can use ViewState yourself if you want to store a value that is only used on one page. Use Session if you want a value to be available on other pages in the site.
ViewState["x"] = x;