This is more for using as a base for your page. In your aspx code behind just have it inherit from MyPage instead of Page and it will work the way you expect I think. I guess you could create an instance of it on a page event like oninit or pageload and then call the methods you need... but without doing more thinking I am not sure if just creating an instance and clalling the method CreateHtmlTextWriter will work you may have to put something in your aspx code behind like the code below if your going to just creat an instance of it rather than have your code behind inherit from it instead of Page.
Inyour code behind put this instead of using page load...
protected override HtmlTextWriter CreateHtmlTextWriter(TextWriter writer)
{
MyPage newWriter = new MyPage();
return newWriter.MyHtmlTextWriter(writer);
}
code not tested nor implied to be correct :)
Answering a question increases your knowledge asking a question shows your Intelligence!