C# Javascript iframe resize
<p>How do you auto resise an iframe after you've added content to a div in the code behind. I'm called </p>

<pre><code>function resizeIframe() {
  parent.document.getElementById('iframe2').style.height = document.getElementById('events_calendar').offsetHeight;
}
</code></pre>

<p>but i'm about 20 px short. BAsically i've got a calendar that renders whats on on a certain day. this can be n number of lines. after i've popuplated that div in C# code behind I'm call resizeIframe() and not getting anywhere. i've tired style.height, clientheight etc.</p>

<p>Thanks
Frames</p>
