Hi,
you can use following approach to register your javascript in transformation:
<script runat="server">
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
this.Page.ClientScript.RegisterClientScriptBlock(typeof(string), "uniquevalue", "document.write('test');", true);
}
</script>
I hope this will help you.
Best regards,
Miroslav Remias.