In ASP.NET 2.0, a new class ClientScriptManager is introduced and the old method Page.RegisterClientScriptBlock is deprecated. Below is some sample code to register client script from an ASP.NET page:
if(!ClientScript.IsClientScriptBlockRegistered("ClosePopUp"))
{
ClientScript.RegisterClientScriptBlock(this.GetType(), "ClosePopUp", "your javascript code goes here");
}
Note the GetType() method, I recommend going through this post which sheds more light on the same:
http://blogs.ipona.com/james/archive/2006/10/03/6710.aspx