title: Iframe autoresizing height from codebehind in C#
body: <p>My html page is</p>
  
  <pre><code>&lt;iframe runat="server" id="iframe1" width="100%" height="100%" scrolling="no"  frameborder="0"&gt;&lt;/iframe&gt;
  </code></pre>
  
  <p>.cs content in my pageload event</p>
  
  <pre><code>iframe1.Attributes["src"] = "http://default.com/";
  //iframe1.Attributes["height"] = "100%";
  //iframe1.Attributes["width"] = "100%";
  iframe1.Attributes.Add("style","width:100%;height:100%;");
  </code></pre>
  
  <p>But its not working </p>
  
  <p>i want to display whole page content but my height of iframe is not taking the height of <a href="http://default.com/" rel="nofollow">http://default.com/</a></p>