I''ve been working with a CSharp web-site (and am new to it). I have a
javascript function that accepts variables from my CSharp code. It all works
fine, with the exception of one variable type. I created an ArrayList
variable in my CSharp program and it collects the information i need with no
problem. I pass it to my javascript with no problem. Where I'm having a
problem is retreiving the ArrayList values once it's been passed to the
javascript. Since I am not familiar with CSharp and Javascript I am not sure
where to turn for help.
It appears to me that the ArrayLlist was successfully passed to my
javascript function without error, since the remainder of my javascript
works fine. But, when I try to retrieve anything from my array list I have no
luck.
So, If I had the function below, that was accepting an array list as such,
and the array list contains 4 items, how could I display the results in a
window. (My actually purpose is not to display in a window, but I just want
to get somethign working right now).
function CalcTotal(myArrayList)
(
for (i = 1; i < 5; i++)
{
window.alert('myArrayList Value: ' + i + ' - ' + myArrayList(i) );
}
}
My ulimate goal is to scan through the results of the ArrayList to perform
some calculations on a web-page. I've got this part working, but I need to
pass in my answers via an ArrayList.
Any help would be greatly appreciated.