When I debug in code behind It let me to go inside "Test" method only one time, not three times, why ? I see that I have javascript "for loop" which should go three times inside C# "Test" method. But it goes only one time, is this normal ? I want to go through "Test" method three times as I said in javascript "for loop". Where is the problem ?
aspx code:
<script>
$(function () {
for (var i = 0; i < 3; i++) {
console.log("active");
var a = '<%= this.Test() %>';
}
});
</script>
C# code behind:
public string Test()
{
int a = 1;
return "active";
}
awill always be1.