[英]Use External Javascript File Function in RegisterStartupScript Method
I put together my whole javascript functions in one file(let's say it for making clear, javascriptsample.js). 我把我的整个javascript函数放在一个文件中(让我们说它是为了清楚,javascriptsample.js)。
And i need to use one of the function, which is in that file, in my asp.net side using RegisterStartupScript. 我需要使用RegisterStartupScript在我的asp.net端使用该文件中的一个函数。
How can i call this function? 我怎么称呼这个功能?
You must give a reference of the javascriptsample.js
in your aspx page... 您必须在aspx页面中提供
javascriptsample.js
的引用...
Aftre that you can use.. Aftre,你可以使用..
ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "tmp", "<script type='text/javascript'>JavascriptFunctionname();</script>", false);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.