title: Include HTML file in C# code
body: <p>I have a page that has a left menu in it. This left menu is an HTML file [LeftFrame.htm] and is included in the aspx page using the following code.</p>
  
  <pre><code>&lt;!-- #include file="LeftFrame.htm"--&gt;
  </code></pre>
  
  <p>Now I need to change the file name to LeftFrameOthers.htm from C# code.</p>
  
  <p>Eg:</p>
  
  <pre><code>if ( arg == 1 )
  {
      divMenu.InnerHTML = "&lt;!-- #include file="LeftFrame.htm"--&gt;";
  }
  else
  {
       divMenu.InnerHTML = "&lt;!-- #include file="LeftFrameOthers.htm"--&gt;";
  }
  </code></pre>
  
  <p>But it creates an error and left menu is not loaded. Is there a way to manage this from C# code.</p>
  
  <p>I don't want to use two divs for this purpose like..</p>
  
  <pre><code>&lt;div id="divOwnLeftFrame" runat="server" style="DISPLAY: block"&gt;
             &lt;!-- #include file="LeftFrame.htm"--&gt;&lt;/div&gt;&lt;div id="divOthersLeftFrame" runat="server" style="DISPLAY: block"&gt;
            &lt;!-- #include file="LeftProfileFrame.htm"--&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>and change the display property of the divs from C# code.</p>
  
  <p><strong>I am using VS 2003</strong></p>