title: AJAX Control Toolkit TabPanel on an ASP.NET MVC View gives an HttpException "OutputStream is not available when a custom TextWriter is used."
body: <p>I have installed the AJAX Control Toolkit following the included instructions and I'm trying to add a TabContainer with a couple of TabPanels to a view in an ASP.NET MVC application. Is this possible? I can get the TabContainer and TabPanel controls to work in a Webforms application but not in MVC. </p>
  
  <p>In one of my views I have the following code:</p>
  
  <pre><code>&lt;%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage&lt;MvcApplication1.Models.Class1&gt;" %&gt;
  
  &lt;%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="ajaxToolkit" %&gt;
  
  &lt;asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"&gt;
      Create
  &lt;/asp:Content&gt;
  
  &lt;asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"&gt;
  
      &lt;form id="form1" runat="server"&gt;
  
      &lt;ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"&gt;
      &lt;/ajaxToolkit:ToolkitScriptManager&gt;
  
      &lt;h2&gt;Create&lt;/h2&gt;
  
      &lt;ajaxToolkit:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="1"&gt;
  
          &lt;ajaxToolkit:TabPanel runat="server" HeaderText="TabPanel1" ID="TabPanel1"&gt;
          &lt;ContentTemplate&gt;
          &lt;/ContentTemplate&gt;
          &lt;/ajaxToolkit:TabPanel&gt;
  
          &lt;ajaxToolkit:TabPanel ID="TabPanel2" runat="server" HeaderText="TabPanel2"&gt;
          &lt;ContentTemplate&gt;
          &lt;/ContentTemplate&gt;
          &lt;/ajaxToolkit:TabPanel&gt;
  
      &lt;/ajaxToolkit:TabContainer&gt;
  
      &lt;/form&gt;
  
  &lt;/asp:Content&gt;
  </code></pre>
  
  <p>The above gives an HttpException "OutputStream is not available when a custom TextWriter is used." Keeping the TabContainer but removing the TabPanel does not raise any errors. </p>
  
  <p>Any suggestions?</p>
  
  <p>Thanks.</p>