我把我的整个javascript函数放在一个文件中(让我们说它是为了清楚,javascriptsample.js)。
我需要使用RegisterStartupScript在我的asp.net端使用该文件中的一个函数。
我该如何调用此功能?
答案 0 :(得分:2)
您必须在aspx页面中提供javascriptsample.js
的引用...
Aftre,你可以使用..
ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "tmp", "<script type='text/javascript'>JavascriptFunctionname();</script>", false);