Posted on: 6/11/2014 7:29:56 PM | Views : 398

Hi everyone,
I want to know how to execute a javascript function from code behind.
It needs to be executed within a button onClick method before the postback
It would be something like this:

aspx page
<script language="javascript">
function doThis() { // Do something here }
</script>

aspx.vb page - code behind
 Protected Sub btn_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btn.Click
      vb code here
      execute javascript code here //doThis()
       response.redirect

I've looked into RegisterClientScriptBlock but it doesn't work.

Go to the complete details ...