There is one main class in the ASP.NET Framework included for working with Javascript: the ClientScriptManager class. This class is exposed by the Page.ClientScript property. The ClientScriptManager class has several useful methods for working with Javascript including:
RegisterClientScriptBlock():
Adds a script to a page right after the opening server-side <form> tag
RegisterStartupScript():
Adds a script to a page right before the closing server-side <form> tag
RegisterClientScriptInclude():
Adds a reference to an external Javascript file
GetWebResourceUrl() - Returns the URL to a server-side resource
for more info:
Building a Custom ASP.NET Control that uses Javascript, Cascading Style Sheets, and Ajax[
^]