title: How to set document.getElementById(progressPanel.ID) in aspx.cs page
body: <p>I have javascript which sets the location of panel and javascript is below</p>
  
  <pre><code>function ShowProgressPanel(progresspanel)
  {
      var progressPanelId = document.getElementById(progressPanel.ID);
      alert(progressPanelId);
      if (progressPanelId != null) 
      {
  
          var height = Math.min(document.documentElement.clientHeight, document.body.offsetHeight);
          alert(height);
          var width = Math.min(document.documentElement.clientWidth, document.body.offsetWidth);
          var xPos = Math.round((width / 2) - (progressPanelId.clientWidth / 2));
          var yPos = Math.round((height / 2) - (progressPanelId.clientHeight / 2));
          setLocation(progressPanelId, { x: xPos, y: yPos });
      }
  
      function setLocation(element, point) 
      {
          Sys.UI.DomElement.setLocation(element, point.x, point.y);
      }
  }
  </code></pre>
  
  <p>I am passing client id from aspx page </p>
  
  <pre><code>var progressPanel = document.getElementById('&lt;%=_progressPanel.ClientID %&gt;');
  
  ShowProgressPanel(progressPanel);
  </code></pre>
  
  <p>it is set to html div tag.above code works fine.when i send through aspx.cs page it shows contentplace holder element and height is not set.</p>
  
  <pre><code>string script = string.Format(@"ShowProgressPanel('{0}');", _progressPanel.ClientID);
  ScriptManager.RegisterStartupScript(this, typeof(Page), _progressPanel.ID, script, true);
  </code></pre>
  
  <p>But in both progress panel is placed in contetnplaceholder.
  How shall i do it in aspx.cs page</p>