Not able to register JQuery script via asp.net "ScriptManager.RegisterStartupScript"
Hi All,
I am working with asp.net & jquery. I have created several function & attached events(click, change, mouseover etc) to my controls. All is working fine except one thing.
1. If I declare any variable inside jquery block like below:
$(function(){
var _x=false;
function _foo(){
alert('Some Text');
}
});
& If I try to set value of _x or If I want to call function _foo by registering the script via .net page, I am getting the error. "_foo is not defined."
Because I have to set the initial value of _x on the basis of few conditions. For variables, I found a solution. I declared _x outside the jquery block.
I don't know Is this correct way or not but it is working.
But in case of function, I cannot declare my function outside jquery block because there are several dependents functions which will call inside _foo.