I am currently facing a challenge with using a global variable in JavaScript within an asp.net application.
Within my code, I have a button that triggers the registration of a script:
Page.ClientScript.RegisterStartupScript(Me.GetType(),"showModel",String.Format("<script>showModel('{0}', '{1}');</script>", objID, token))
This script contains a globally defined variable. However, when attempting to call another function on the same script using a similar method, the global variable is returning null. Is there a different approach to invoking the script after it has been registered?