ASP.NET 2.0 provides the ClientScript.RegisterClientScriptBlock() method for registering JavaScript in an ASP.NET Page.
The issue I'm having is passing the script when it's located in another directory. Specifically, the following syntax does not work:
ClientScript.RegisterClientScriptBlock(this.GetType(), "scriptName", "../dir/subdir/scriptName.js", true);
Instead of dropping the code into the page like this page says it should, it instead displays ../dir/subdir/script.js , my question is this:
Has anyone dealt with this before, and found a way to drop in the javascript in a separate file? Am I going about this the wrong way?