Question: Here's the URL:

<http://www.ourpagesonline.co.uk/mobile/index.asp?ID=207&aID=1>

It works fine in iPhone simulator, all my desktop browsers, but in the iPhone all it shows is the GUI but no images... 

Any know what's going on here? Is it just too complicated for iPhone?

Answer: 
You can try the following approach:

```
@{
    var array = new [] {"foo", "bar"};
}

<script type="text/javascript">
    var array = [@Html.Raw(String.Join(",", array.Select(s => "'" + s + "'")))];

    alert(array[1]);
</script>

```

It serializes the C# array as a JavaScript one in the format ["foo", "bar"].
This is a perfect example of when you might want to consider using JSON. Assuming you're developing using ASP.NET Web Pages (as opposed to Web Forms / MVC), in your App\_Code directory, make a helper file called Javascript.cshtml with the following code:

```
@using System.Web.Script.Serialization;

@helper ToJson(object obj) {
    var ser = new JavaScriptSerializer();
    @Html.Raw(ser.Serialize(obj))
}

```

Now, if your main page you can reference the helper like so: `@Javascript.ToJson(myObj)`. So, in your page you might do something like this:

```
@{
    var myCSharpObj = new { First = "1st", Second = "2nd" };
}
<script language="javascript">
    var myJSObj = @Javascript.ToJson(myCSharpObj);
    alert(myJSObj.Second);
</script>

```