RenderControl with Sub Controls.

RenderControl with Sub Controls.

am 14.01.2008 03:14:05 von 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.







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

Re: RenderControl with Sub Controls.

am 14.01.2008 03:23:59 von Nigil

FYI, I have still using Framework 1.1

Best Regards,
Nigil Chua

"Nigil" wrote in message
news:uQP0kMlVIHA.4476@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.
>
>


>

>
>

>

>
> 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
>

RE: RenderControl with Sub Controls.

am 14.01.2008 17:48:02 von brucebarker

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.
>
>


>

>
>

>

>
> 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
>
>
>