title: ASP.NET Output Cache tag causing issues
body: <p>I'm trying to cache a ascx control in .NET because it's slowing down the website - it works for a few seconds well up to a minute but after that it breaks the main menu of the website and squashes it together.     </p>
  
  <pre><code>&lt;%--&lt;%@ OutputCache Duration="86400" VaryByControl="none" VaryByParam="*" %&gt;--%&gt;
  </code></pre>
  
  <p>I'm not able to post the code that outputs the main menu due to it being in house coding.</p>
  
  <p>Is there any other way i can do output caching that doesn't break the main menu?</p>
  
  <p>See screenshot to what happens once output caching is applied; <a href="http://imgur.com/w5YfvcG" rel="nofollow">HERE</a></p>
  
  <p>Apologies if i've been too vague. </p>
  
  <p>Right i've tried it this way doesnt seem to screw the main menu up but when you load the page up it gets put in to the cache but when you click on other page it's still slightly slow in loading up. </p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
  {
      Response.Cache.SetExpires(DateTime.Now.AddMonths(1));
      Response.Cache.SetCacheability(HttpCacheability.ServerAndPrivate);
      Response.Cache.SetValidUntilExpires(true);
  }
  </code></pre>
  
  <p>You can have a look at the site here: <a href="http://bangdrum.flyingatom.everycity.co.uk/bang-drum-workshops.aspx" rel="nofollow">WEBSITE LINK HERE</a></p>
  
  <p>Is there anything else i can do to quicken to loading time before it gets put in to the cache?</p>