470,636 Members | 1,365 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,636 developers. It's quick & easy.

RenderControl with Sub Controls.

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
Jan 14 '08 #1
2 3504
FYI, I have still using Framework 1.1

Best Regards,
Nigil Chua

"Nigil" <nc***@mfglobal.com.sgwrote in message
news:uQ**************@TK2MSFTNGP06.phx.gbl...
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

Jan 14 '08 #2
as you are short-circuiting the page processing events, the repeater is
probably never bound to anything.

-- bruce (sqlwork.com)
"Nigil" wrote:
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
Jan 14 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by George Ter-Saakov | last post: by
reply views Thread by charles | last post: by
reply views Thread by zoneboy | last post: by
1 post views Thread by John Dalberg | last post: by
1 post views Thread by GroupReader | last post: by
1 post views Thread by GroupReader | last post: by
2 posts views Thread by Josh Carver | last post: by
???
reply views Thread by Stoney L | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.