title: MaintainScrollPositionOnPostback is not working?
body: <p>I have a page with two drop down lists (ddlA and ddlB)
  Once the user selects an item from ddlA, it will populate items in ddlB 
  I have auto post-back turned on for ddlA.</p>
  
  <p>and since I wanted to maintain the scroll position, i turned on the MaintainScrollPositionOnPostBack to true like this in the page load method. :        </p>
  
  <pre><code>this.MaintainScrollPositionOnPostBack = true;
  </code></pre>
  
  <p>But this doesn't seem to fix the issue. </p>
  
  <p>Is there a workaround to fix the problem.?</p>
  
  <p>-- UPDATE -- </p>
  
  <p>I added this js code to the page and now the problem is that the autopost back is never happening.. </p>
  
  <pre><code>  &lt;script type="text/javascript"&gt;
  var xPos, yPos;
  var prm = Sys.WebForms.PageRequestManager.getInstance();
  prm.add_beginRequest(BeginRequestHandler);
  prm.add_endRequest(EndRequestHandler);
  function BeginRequestHandler(sender, args) {
      xPos = $get('scrollDiv').scrollLeft;
      yPos = $get('scrollDiv').scrollTop;
  }
  function EndRequestHandler(sender, args) {
      $get('scrollDiv').scrollLeft = xPos;
      $get('scrollDiv').scrollTop = yPos;
  }
      &lt;/script&gt;
  </code></pre>
  
  <p>Am i adding the js code incorrectly?  I found it <a href="http://weblogs.asp.net/andrewfrederick/maintain-scroll-position-after-asynchronous-postback" rel="nofollow">here</a></p>