Reputation: 63816
I'm programatically creating a simple HTML file which is saved directly to disk. I was looking at this example: http://www.dotnetperls.com/htmltextwriter
I'm confused why he mixes HtmlTextWriter
's Render
and Write
methods, and how I should choose between RenderBeginTag()
and WriteBeginTag()
.
Are there are hard rules on what is right & wrong?
Upvotes: 3
Views: 1593
Reputation: 905
Use the RenderBeginTag overload of the RenderBeginTag(HtmlTextWriterTag) method if the markup element is of a known type that is one of the HtmlTextWriterTag enumeration values.
Upvotes: -2