R
Rukmal Fernando
Just rephrasing the subject...
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>);
myControl1.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.
eg: string HTMLString = "<TABLE>...{0}...{1}"
and pass it in like WriteHTML(HTMLString, myControl1, myControl2...);
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.
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>);
myControl1.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.
eg: string HTMLString = "<TABLE>...{0}...{1}"
and pass it in like WriteHTML(HTMLString, myControl1, myControl2...);
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.