Well I am using Visual Studio 2010
,
If I am not using Ajax
extention i.e. 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
"
But what should be done if my C#
code开发者_StackOverflow社区 is behind a control inside UpdatePanel and we are using ScriptManager
to use Ajax
?!! please advice
On the button's onclick event:
ScriptManager.RegisterStartupScript(this, this.GetType(), "alertJsTest", "alert('test!');", true);
精彩评论