views:

77

answers:

2

is it possible to get HtmlTextWriter of a control?
if no, then how can i call the RenderEndTag of a control in code behind?

i am facing a problem in my application. i extended the listbox user control and override its RenderEndTag event.

if i used the new listbox (Mylistbox) normally inside a WebPage, everything works fine. but when i put Mylistbox in a Webusercontrol and include the Webusercontrol in a WebPage, the RenderEndTag of the control is not called for some reason.

so i guessed that i should explicitly call 'RenderEndTag' of the control. to do so i need to pass an HtmlTextWriter...

A: 

so you are basically saying that somewhere in your code when you call

writer.RenderEndTag();

it is not adding the endTag because you think you override the RenderEndTag() method.

Please post code of the override / virtual method as well as where you use it.

VoodooChild