R
Rukmal Fernando
Hi,
I had a lot of work to do in rendering a custom web control by coding it
using calls like
protected override void Render(HtmlTextWriter output)
{
output.Write(HtmlTextWriterTag.<tag>);
myControl.Render(output);
...
}
Afterwards, I wrote a helper method so that I could build an HTML string
with placeholders for each of the controls and then tokenizing the HTML
string to write the HTML as a string and then calling the control's render
method.
This seemed to work ok, but now I'm wondering why the HtmlTextWriterTag enum
exists and whether my rendering html content as strings is sub-optmal.
If anyone knows how these two techniques execute, I'd be really grateful to
hear from you.
Thanks!
Rukmal.
I had a lot of work to do in rendering a custom web control by coding it
using calls like
protected override void Render(HtmlTextWriter output)
{
output.Write(HtmlTextWriterTag.<tag>);
myControl.Render(output);
...
}
Afterwards, I wrote a helper method so that I could build an HTML string
with placeholders for each of the controls and then tokenizing the HTML
string to write the HTML as a string and then calling the control's render
method.
This seemed to work ok, but now I'm wondering why the HtmlTextWriterTag enum
exists and whether my rendering html content as strings is sub-optmal.
If anyone knows how these two techniques execute, I'd be really grateful to
hear from you.
Thanks!
Rukmal.