Created
December 10, 2009 15:59
-
-
Save joecorcoran/253413 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Start of code | |
protected override void RenderContents(HtmlTextWriter writer) | |
{ | |
// Writing a simple h1 | |
// You have to prepare your tag attributes before opening the tag | |
writer.AddAttribute(HtmlTextWriterAttribute.Id, "my_h1"); | |
// Open h1 tag | |
writer.RenderBeginTag(HtmlTextWriterTag.H1); | |
// Write contents of h1 | |
writer.Write("My heading"); | |
// Close h1 tag | |
writer.RenderEndTag(); | |
writer.Close(); | |
} | |
// End of code |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment