Assuming you're doing this from within a Page class, not from an HTTPHandler.
Do you have to do this in your own Render Method? If you know the script needs to be embedded into the page, then you can use Page.ClientScript.RegisterClientScriptBlock() to get the script into the right spot.
Actually the place where you normally want script code is just before the tag...
You can also use a Response Filter to actually inject HTML in the rendering process - you could scan for the tag you're looking for and then fix it up. This is a bit of work though and probably not what you need. If you can use the ClientScript object (in 2.0) - it's by far the easiest and most flexible way to get script into the right place on the page.
+++ Rick ---
>STUCK...
>
>From a prior post, I was directed to one item, but have found what appears to be a closer item for my needs... the HTML32TextWriter, and its RenderAfterContent() method.
>
>My problem is this. I need to put some script at the near-end of the final vb.net web form just before the closing {/html} tag. However, I'm at a loss on how to implement this.
>
>If I create a class using the inheritance of the textWriter, and put my code in there, no problem... syntax that is...
>
>Now, when I try to put it on the form, it appears as a link to the .vb Script. I don't want the page to show the link, but have the form put this content in at runtime when rendering the page.
>
>Again, the critical thing is is must be at the bottom of the page just inside the final html closing tag.
>
>Thanks