RenderControl with Sub Controls.

N

Nigil

Hi Guys,

Does anyone know how to RenderControl with sub controls? cos I am having
issues with that.
Following is my code.

Inside my UserControls, I have a Repeater.

<form method="post" class="Form1" runat="server" id="Form1">
<div id="Main_Div" runat="server">
<Test:Ctr id="Test" runat="server"></Test:Ctr>
</div>
</form>

So when I call the RenderControl on my "Main_Div", it does not render the
Repeater.

private void Page_Load(object sender, System.EventArgs e)
{
StringWriter String_Writer=new StringWriter();
HtmlTextWriter Html_Writer=new HtmlTextWriter(String_Writer);
Main_Div.RenderControl(Html_Writer);
Response.Write(String_Writer);
Response.End();
}

Best Regards,
Nigil Chua
 
B

bruce barker

as you are short-circuiting the page processing events, the repeater is
probably never bound to anything.

-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top