http://www.thescarms.com/dotnet/ClientJava.aspx
Many times on your web pages you may want to use client side JavaScript to perform validation or provide visual effects. JavaScript can be added to an ASP.NET page within the HTML code or it can be added in the server side code. To have the server side code render the JavaScript in the page, do not use the Response.Write method. Instead use the Pageclass.
The Page class offers the following methods:
Page.RegisterStartupScript
- adds JavaScript to the web form right before the ending </form> tag
Page.RegisterClientScriptBlock
- adds JavaScript to the web form, right after the <form runat="server"> declaration
Page.IsStartupScriptRegistered
- Determines if the client startup script is registered with the page
Page.IsClientScriptBlockRegistered
- Determines if the client script block is registered with the page