title: How to set height and width of a new window from code behind
body: <p>I have been trying this from hours that I am opening a new window and I am bound to launch from code behind so it is not opening in new tab.
  I want to adjust the height and width of this window, but I am unable to set the same.
  I also tried calling a javascript function from code behind and writing the same in aspx page, but no luck.</p>
  
  <p>I am posting my code:
  From Code behind:</p>
  
  <pre><code>Page.ClientScript.RegisterStartupScript(typeof(string), scriptKey, "&lt;script type='text/javascript'&gt;window.open('../ReportWebForm.aspx?ReportType=Report','height=50,width=2000,left=0px,top=0px,resizable=yes,scrollbars=yes,toolbar=yes,status=yes');&lt;/script&gt;");
  </code></pre>
  
  <p>if I launch from server by calling aspx page javascript:</p>
  
  <pre><code> function OpenWindow() {
          window.parent.open('../ReportWebForm.aspx?ReportType=Report', 'width = 100%, height = 100%');
      }
  </code></pre>