How can I call a .net method in inline code using a javascript variable? My code looks like this:
for (var i = 0; i < numberIterations; i++)
{
var result = <%# GetFilterTagURL( myArray[i].Value, false) %>;
//do stuff with result
}
This block is inside a javascript block; the GetFilterTagURL method is a a .net method and I want to pass the variable myArray[i].Value as the first parameter.
Any ideas?
Update: All your answers are helpful. I guess that, as you say, I'll have to create a web service to achieve what I want.
Ntimes in the code behind you will need to post this value to some handler, page or webservice and get the response value.