Question

I have a aspx page that, when loading, will initialize a class called, Bill :)

When Bill is initialized, the aspx page will wire a function to a handler of Bills.

When that function in Bill is fired, I would like to call a javascript function in the aspx page, but that is where I am having difficulties...

I have tried ClientScript.Register and all of that, but nothing is seeming to work. As of now, I am simple trying to get the function to fire an alert.

I have a feeling that I am missing something critical in the understanding of this, so any information would be greatly appreciated.

Thanks.

Was it helpful?

Solution

Is all of this happening in javascript, or is some of this server-side code? Javascript is client-side only, so if you are running server-side code, you can't execute the javascript on the server. You can, however, register script to run when the page renders in the browser (be careful of this, if you are opening another window, actions like this will be blocked by the browser unless the user directly initiates the action by clicking a button or something similar).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top