This piece of code is related to a previous post of JavaScript Window from Code Behind. The idea is the same; I needed to get some JavaScript to run from the code behind. For this example it was to open a new window. The real difference with this and the previous post is using ScriptManager instead of ClientScript.
VB.Net Code
Dim strScript As String = "<script language='javascript'>"
strScript += "window.open('URL Goes Here');"
strScript += "</script>"
ScriptManager.RegisterStartupScript(Page, Me.GetType, "clientScript", strScript, False)
C#
string script = "<script language='javascript'>";
script += "window.open('URL Goes Here');";
script += "</script>";
ScriptManager.RegisterStartupScript(Page, typeof(string), "clientScript", script, false);