I have a loop in JS, and I want to pass each parameter in that loop to a function in ASP.NET in the codebehind.
something like that:
for (var i = 0; i < elements.length; i++)
{
}
And I want to pass a function in <%%> the elements[i].
How can I do that?
thanks!
It’s not that easy, the only way is to make a post and send the variables.
What I normally do is to have a handler to do the job for me and using jQuery I get a nice pretty effect…
from your javascript code
in your handler
that “OK” will be passed to the
datavariable, and you can interact your user with a much more rich environment.