I'm trying to write HTML code into my ASPX file from my C# file. This is what I have so far, just to try to get it working before I actually starting putting in stuff that I want.
protected void Page_Load(object sender, EventArgs e)
{
StringWriter sw = new StringWriter();
HtmlTextWriter writer = new HtmlTextWriter(sw);
writer.WriteBeginTag("p");
writer.Write("THERE IS STUFF HERE");
writer.WriteEndTag("p");
}
If my code up to this point is correct, then I assume I need some line of code that actually tells it to write, or something like that. However, I don't know what that is.
Also, if I get this working, what part of the page will it write to? Is there any way to tell it where to write?