I have a variable named "tempVariable" in my jquery file. now I need to change its value from code behind in c#. What I have done till now is
in my C# code
public void changeValueInJquery()
{
bool newVal = false;
Page.ClientScript.RegisterClientScriptBlock(
GetType(),
"key", "ChangeValue(" + newVal + ");", true);
}
my jquery code is as
function ChangeValue(value1) {
alert(value1);
tempVariable = value1;
}
The issue is that ChangeValue() function never gets hit.
Am I going wrong somewhere?
jQuery != Javascript