Remove control from repeater before rendering
<p>i want to remove hidden field control from repeater control before rendering i trying to export repeater control to excel</p>

<pre><code>StringWriter sw = new StringWriter();
HtmlTextWriter htw = new HtmlTextWriter(sw);
Repeater newrpt = (Repeater)Cache["Report"];

//remove hidden field from newrpt 
newrpt.RenderControl(htw);
</code></pre>

<p>this is my code. I need to remove because I am getting error <code>Control 'ctl00_ContentPlaceHolder1_rptSafetyIndicator_ctl01_hidSIId' of type 'HiddenField' must be placed inside a form tag with runat=server.</code> </p>
