更新时间:2023-12-05 23:11:40
也许这样可行:
RegisterStartupScript(someVariable," script
language =''javascript'''src =''yourInclude.js''/>")
欢呼,
mortb
Stan Sainte-Rose < ST ** @ cyber972.com>在消息中写道
news:%2 *************** @ tk2msftngp13.phx.gbl ...
Maybe this would work:
RegisterStartupScript(someVariable,"<script
language=''javascript''′src=''yourInclude.js'' />")
cheers,
mortb
"Stan Sainte-Rose" <st**@cyber972.com> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
我需要使用一个Js文件,我想知道如何使用来自用户控件的RegisterStartupScript命令加载js文件
。
另外,如果我在同一个网页中多次加载相同的用户控件,
我是否必须检查js文件是否仍然加载?
Stan
Hi,
I m working on a user control.
I need to use a Js file, I would like to know how to load the js file using RegisterStartupScript command from the user control.
Also, if I load the same user controls several times in the same webpage, do I have to check if the js file is still loaded ?
Stan
你好Mortb
我试过你所说的......但它对我不起作用。
别忘了,我想在用户控件中使用它。
Stan
" mortb" <莫**** @ hotmail.com> écritdansle message de news:
#w ************* @ TK2MSFTNGP09.phx.gbl ...
Hi Mortb
I ve tried what you''ve said.. but it doesn''t work for me.
Do not forget, I would like to use this within a user control.
Stan
"mortb" <mo****@hotmail.com> a écrit dans le message de news:
#w*************@TK2MSFTNGP09.phx.gbl...
也许这个会工作:
RegisterStartupScript(someVariable," script
language =''javascript'''src =''yourInclude.js''/>")
>欢呼,
mortb
Stan Sainte-Rose < ST ** @ cyber972.com>在消息中写道
新闻:%2 *************** @ tk2msftngp13.phx.gbl ...
Maybe this would work:
RegisterStartupScript(someVariable,"<script
language=''javascript''′src=''yourInclude.js'' />")
cheers,
mortb
"Stan Sainte-Rose" <st**@cyber972.com> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
我我正在使用一个用户控件。
我需要使用一个Js文件,我想知道如何使用来自用户控件的
Hi,
I m working on a user control.
I need to use a Js file, I would like to know how to load the js file using
RegisterStartupScript命令加载js文件。
另外,如果我在同一个
RegisterStartupScript command from the user control.
Also, if I load the same user controls several times in the same
网页中多次加载相同的用户控件,请执行
webpage, do
我必须检查js文件是否是仍然加载?
Stan
I have to check if the js file is still loaded ?
Stan
请务必发送启动脚本从您的用户控件到基页...类似于:
Dim strScript As New System.Text.StringBuilder()
Dim basePage As Page = Me.Page
Dim ScriptNameAsString as String =" SCRIPTNAME"
strScript.Append("< script language =''javascript'''src =''yourInclude.js''/>&quo t;)
如果不是basePage.IsClientScriptBlockRegistered(ScriptNameA sString)那么basePage.RegisterClientScriptBlock(ScriptNameAsStr ing,strScript.ToString)
" mortb" <莫**** @ hotmail.com>在消息新闻中写道:%2 *************** @ TK2MSFTNGP09.phx.gbl ...
Be sure to send the startup script to the base page from your user control ... something like:
Dim strScript As New System.Text.StringBuilder()
Dim basePage As Page = Me.Page
Dim ScriptNameAsString as String = "SCRIPTNAME"
strScript.Append("<script language=''javascript''′src=''yourInclude.js'' />")
If Not basePage.IsClientScriptBlockRegistered(ScriptNameA sString) Then basePage.RegisterClientScriptBlock(ScriptNameAsStr ing, strScript.ToString)
"mortb" <mo****@hotmail.com> wrote in message news:%2***************@TK2MSFTNGP09.phx.gbl...
也许这样可行:
RegisterStartupScript( someVariable,< script
language =''javascript'''src =''yourInclude.js''/>")
欢呼,
mortb
Stan Sainte-Rose < ST ** @ cyber972.com>在消息中写道
新闻:%2 *************** @ tk2msftngp13.phx.gbl ...
Maybe this would work:
RegisterStartupScript(someVariable,"<script
language=''javascript''′src=''yourInclude.js'' />")
cheers,
mortb
"Stan Sainte-Rose" <st**@cyber972.com> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
我我正在使用一个用户控件。
我需要使用一个Js文件,我想知道如何使用
Hi,
I m working on a user control.
I need to use a Js file, I would like to know how to load the js file
从以下命令加载js文件
using
用户控件。
另外,如果我在同一个网页中多次加载相同的用户控件,
RegisterStartupScript command from the user control.
Also, if I load the same user controls several times in the same webpage,
做
我必须检查js文件是否是还在装吗?
Stan
I have to check if the js file is still loaded ?
Stan