A: An article found at http://aspalliance.com/ArticleViewer.aspx?aid=851&pid=-1 explains exactly how to do that. First, place the script in a separate .js file. Then pass the required value to the script using Page.ClientScript.RegisterClientScriptBlock().
In ASP.Net 2.0 Page.ClientScript.RegisterClientScriptBlock() is used to download and store a script in a browser's cache for quicker reponse in the browser.
For more information, go to http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/JAVAwASP2.asp.