Passing arguments to JavaScript function from code-behind

前端 未结 9 2038
孤街浪徒
孤街浪徒 2020-12-03 17:54

I would like to call a javascript function from an aspx control. For instance, suppose I had:


    

        
9条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-03 18:23

    I think you want to execute the javascript serverside and not in the browser after post-back, right?

    That's not possible as far as I know

    If you just want to get it execute after postback, you can do something like this:

    this.Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "xx", "");
    

提交回复
热议问题