Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > HtmlTextWriter: why do we need it and how is its performance?

Reply
Thread Tools

HtmlTextWriter: why do we need it and how is its performance?

 
 
Rukmal Fernando
Guest
Posts: n/a
 
      10-03-2003
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.



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Its a bird, its a plane, its.. um, an Attribute based System? thunk Ruby 14 04-03-2010 10:08 AM
Its a bird, its a plane, its.. um, an Attribute based System? thunk Ruby 0 04-01-2010 10:25 PM
Its a bird, its a plane, no ummm, its a Ruide thunk Ruby 1 03-30-2010 11:10 AM
findcontrol("PlaceHolderPrice") why why why why why why why why why why why Mr. SweatyFinger ASP .Net 2 12-02-2006 03:46 PM



Advertisments