Output
All of the code that we will use to display information will be added to the Render.
You will notice that the Render method takes an HTMLTextWriter as a parameter, this output object can be used to write the appropriate information -
output.AddAttribute("border", "1") output.AddStyleAttribute("border-color", "#000000") output.RenderBeginTag("table") output.Write(Text) output.RenderEndTag() |
That code will print out the following HTML -
<table border="1" style="border-color:#000000;"> Hello There </table> |
Let's go over these methods.