C# code:
public object SessionScheduleDates
{
get
{
string output="";
if (Session != null)
{
string input = Session.ScheduleDates;
output = "[" + "\"" + input.Replace(",", "\",\"") + "\"" + "]";
}
return output;
}
}
<script>
var ScheduleDates = new Array();
ScheduleDates = <%= SessionScheduleDates %>;
for (var i = 0; i < ScheduleDates.length; i++) {
$("#calendar").fullCalendar('addEventSource', [{
start: ScheduleDates[i],
rendering: 'background',
block: true,
}, ]);
}
</script>