showing results for - "razor list to js array"
Claire
15 May 2019
1<script>
2    var myArray = [];
3
4    @foreach (var d in Model.data)
5    {
6      	// Using the @: operator
7      	//we can use javascript variables in razor C#
8        @:myArray.push("@d");
9    }
10</script>
11