View Single Post
  #3 (permalink)  
Old April 1st, 2010, 04:11 AM
ysfkay ysfkay is offline
Authorized User
Points: 343, Level: 6
Points: 343, Level: 6 Points: 343, Level: 6 Points: 343, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2009
Posts: 74
Thanks: 5
Thanked 0 Times in 0 Posts
Default Thanks

Thanks for the reply,
what I am trying to do actually is to retrieve some database info which are all integers store them in an array, then use them to create a html table dynamically.

so I am only using this for a test,

I thought that I assigned the c# array to javascript array when I did this in the code above.

int[] r={1,2,3,4,5,6};

sb.Append("function n(){ for("+ i +" = "+ 0 + ";"+ i +" <" + r.Length + ";" + i + " ++) alert(" +r[i]+");}");

and for the integer, I did this in the code above:

int n=6;

sb.Append("function n(){var arr=" + n+ ";alert(arr); }");

Please I need you to be more specific.thanks