I have the following code, which works perfectly fine in every browser except for IE
<script type="text/javascript">
if (!window.slider) var slider = {}; slider.data = [<% foreach (var item in Model) {%>{ "id":"<%: item.ImageID %>", "client":"<%: item.ContentTitle %>", "desc":"<%: item.ContentDescription %>" },<%} %> ];
</script>
The problem is with the comma that separates each of the values being generated. Internet explorer throws a fit if there's a comma and no proceeding value so I need a way of generating this code without a comma on the last item in the collection. Am I approaching this the right way? Thanks, and see http://hub.mhn.co for the code in action (I welcome and appreciate any comments or feedback, as it's my first MVC site ^_^).