title: How to dynamically load 1 iframe from other in asp.net
body: <pre><code>&lt;iframe name="main" id="menu" src="menu.aspx" allowtransparency="true" frameborder="0"&gt;
  &lt;iframe name="main" id="content" src="content.aspx" allowtransparency="true" frameborder="0"&gt;
  </code></pre>
  
  <p>I have two <code>iframe</code> in my homepage</p>
  
  <ol>
  <li><strong>Menu iframe</strong> (<em>to load the menu</em>)</li>
  <li><strong>Content iframe</strong> (<em>to load content page..I am getting redirected into the respective content pages from back end code like this</em>)</li>
  </ol>
  
  <p>Code:</p>
  
  <pre><code>If CType(Session("ID"), String) = Nothing Then
       Main.Attributes.Add("src", "AdvSrch.aspx")
  Else ' Querystring contains the ID!
       Main.Attributes.Add("src", "Home.aspx?Id=" &amp; Session("ID").ToString)
  End If
  </code></pre>
  
  <p>I want to load a different menu in menu <code>iframe</code> from a button click on content <code>iframe</code> page</p>