https://devshop.wordpress.com/2008/04/10/how-to-choose-from-viewstate-sessionstate-cookies-and-cache/ Problem with Web Applications Web applications are stateless, means once a web page is rendered from server to client, nothing in the page remains o…
User control's property loses value after a postback All variables (and controls) are disposed at the end of the page's lifecycle. So you need a way to persist your variable, e.g. in the ViewState. public int DepartmentID { get { if (ViewState["depar…