![](/img/trans.png)
[英]Send a variable or array from javascript to asp.net (using ajax)
[英]calling javascript from ASP.NET when using ajax extention
好吧,我正在使用Visual Studio 2010
,
If I am not using Ajax
ie if I am not using ScriptManager
and UpdatePanel
then it is simple task to call a JavaScript
function from C#
code behind event of any control using " ClientScript.RegisterStartupScript
"
但是,如果我的C#
代碼位於 UpdatePanel 內的控件后面,並且我們正在使用ScriptManager
來使用Ajax
,應該怎么辦?
?!! 請指教
在按鈕的 onclick 事件上:
ScriptManager.RegisterStartupScript(this, this.GetType(), "alertJsTest", "alert('test!');", true);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.