I need to run two scripts from a single click in a button. One is a client script, and the other is a server one.
I've managed to run both. The server with a normal event handler, and the client with the attributes collection:
btnTest.Attributes.Add("onClick", javascriptpen('test.aspx')
My problem is that I need the server script to ALWAYS run before the client one, as the server script puts a value on to a session varaiabl, and the client script opens a new aspx page that uses that variable on the Load event.
The order is not always the same. Sometimes the server script runs first, and everything works fine, but most of the times the client script opens the new page without having the variable with the rigth value.
Can anyone help me?
NetAngel
I've managed to run both. The server with a normal event handler, and the client with the attributes collection:
btnTest.Attributes.Add("onClick", javascriptpen('test.aspx')
My problem is that I need the server script to ALWAYS run before the client one, as the server script puts a value on to a session varaiabl, and the client script opens a new aspx page that uses that variable on the Load event.
The order is not always the same. Sometimes the server script runs first, and everything works fine, but most of the times the client script opens the new page without having the variable with the rigth value.
Can anyone help me?
NetAngel