c# - Which is more efficient for rendering a server control in ASP.NET -
I am outputting the entire HTML for my server control:
public override Zero rendering (HtmlTextWriter output) {output.Write (myStringBuilder.ToString ()); }
myStringBuilder is a StringBuilder object that is created manually in a separate personal method.
Is this an effective way to do this? Or is it better to pass HtmlTextWriter for my personal method and make several calls to HtmlTextWriter.Write ()?
is more efficient to pass HtmlTextWriter
in its own way, writing it on the output stream It does not, by buffering multiple strings.
In fact, this method is the web control in the core. Net framework is at high level, it is going through the same HtmlTextWriter
in all very render methods, generally, when reading / writing too much, dealing with a stream is more efficient ... What ultimately you are doing (stream is the Reops Stream in this case)
Disclaimer: This is a little customizable unless you are creating some unbroken ... but there is no less adaptation.
Comments
Post a Comment