Thank you for your reply
change to this
>> gv.RenderControl(htmlWrite);
>> //this.RenderControl(htmlWrite);
I have this error when rendering GridView
"Control 'gv' of type 'GridView' must be placed inside a form tag with
runat=server."
<form id="frmRencanaKirim" runat="server">
<div>
<asp:GridView ID="gv" runat="server"
AutoGenerateColumns="False"
ForeColor="#333333"
CellPadding="2"
AllowPaging="false"
ShowFooter="True">
<HeaderStyle BackColor="#507CD1"
Font-Bold="True" ForeColor="White"/>
<FooterStyle BackColor="#507CD1"
Font-Bold="True" ForeColor="White" />
<RowStyle BackColor="#EFF3FB" Height="25px" />
<AlternatingRowStyle BackColor="White" />
<Columns>
...
</Columns>
</asp:GridView>
<asp:Label ID="lbMessage" runat="server" Text=" "
ForeColor="Red" Visible="False" />
</div>
</form>
What's wrong?
"MasterGaurav (www.edujini-labs.com)" <>
wrote in message news:...
>> System.IO.StringWriter stringWrite = new System.IO.StringWriter();
>> System.Web.UI.HtmlTextWriter htmlWrite =
>> new HtmlTextWriter(stringWrite);
>>
>> //gv.RenderControl(htmlWrite);
>> this.RenderControl(htmlWrite);
>
> It should not be this.RenderControl but gridView.RenderControl(htmlWrite)
>
> It's the GridView that has to be rendered and not the page (this)!!!
>
> --
> Happy Hacking,
> Gaurav Vaish | www.mastergaurav.com
> www.edujini-labs.com
> http://eduzine.edujini-labs.com
> -----------------------------------------
>
>