title: ASP.NET Best way to retain label.text value between postback with PageMethods
body: <p>ASP.NET 2.0, PageMethods.</p>
  
  <p>Good day,</p>
  
  <p>I'm using ASP.NET AJAX PageMethods to dynamically change the text of a Label when a dropdownlist is changed on my page.</p>
  
  <p>I know that the text of Labels are not retained between postbacks when they are changed on client-side, which is my case. I've heard that a solution is to keep the label content in a hidden field, then to set Label text from that field in Page_Load.</p>
  
  <p>However, this solution does not seem really clean to me. Are there any other alternatives or best practices?</p>
  
  <p>Thank you!</p>
  
  <hr>
  
  <p>Just to clarify, I have a dropdownlist with people names. When the dropdownlist get changed, I want, in a label, to put the telephone of that person. However, I thought that doing a full postback was not really the best alternative, so I decided to get the telephone with a PageMethod, passing the Id of the item selected in the dropdownlist to retrieve the telephone, and the put it in the label.</p>
  
  <p>However, since other controls cause a full postback, I lose the telephone on every postback. I know that putting it in a hidden field, then setting it back to the label in Page_Load when there is a full postback would work, but I was wordering if there was another solution. Since WebMethods are marked as static, I cannot write Label.text = person.Telephone; in them.</p>