Ciao a tutti ,
premetto che sono alle prime armi con jquery e Asp.
Devo popolare fullcalendar con eventi presi dal database tramite chiamata ajax, ma non riesco ad interpretare correttamente il risultato:

Il campo data che passo al webmethod per il momento non lo uso

Quello che mi viene restituito è corretto e lo visualizzo anche in $("div#risposta") è [{"id": 1, "title": "Trasgo Srl", "start": "2013-09-04T09:30:00", "end": "2013-09-04T10:30:00", "allDay": false, "color": "Red"} ]
La stringa se la metto manualmente dopo events mi popola il calendario, sbaglio a passare i dati.

Vi ringrazio se riuscite a darmi una mano



<script type ="text/javascript">

$(document).ready(function () {
Ricerca_Appuntamenti();
});

function Ricerca_Appuntamenti() {
$.ajax({
type: "POST",
url: "ricerca_appuntamenti.aspx/Check_App",
data: '{name: "' + $("#<%=txtUserName.ClientID%>")[0].value + '" }',
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (data) {
Popola_Calendario(data.d);
},
failure: function (data) {
alert(data.d);
}
});
};


function Popola_Calendario(Eventi_Completi) {
$('#calendar').fullCalendar({
theme: false,
height: 500,
header: {
left: 'prev,next,today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
editable: true,
events: Eventi_Completi
});
$("div#risposta").text(Eventi_Completi)
};

</script>


****************************
<System.Web.Services.WebMethod()> _
Public Shared Function Check_App(ByVal name As String) As String

Dim conn As New OdbcConnection(WebConfigurationManager.ConnectionS trings("Connessione_Mysql").ConnectionString)
Dim Command_Read As OdbcCommand = conn.CreateCommand

Command_Read.CommandText = "SELECT appuntamenti.ID,appuntamenti.Descrizione,appuntame nti.Start_App,appuntamenti.End_App,appuntamenti.Co lor FROM appuntamenti"
conn.Open()

Dim myreader1 As OdbcDataReader = Command_Read.ExecuteReader

Dim Risultati_Appuntamenti As String
Dim Const_App As String = """allDay""" & ": false" & ", "

While myreader1.Read()
Dim ID_App As String = "{" & """id""" & ": " & myreader1.GetInt32(0) & ", "
Dim Title_App As String = """title""" & ": """ & myreader1.GetString(1) & """" & ", "
Dim Start_App As String = """start""" & ": """ & myreader1.GetString(2) & """" & ", "
Dim End_App As String = """end""" & ": """ & myreader1.GetString(3) & """" & ", "
Dim Color_App As String = """color""" & ": """ & myreader1.GetString(4) & """" & "} "

Risultati_Appuntamenti = Risultati_Appuntamenti & "[" & ID_App & Title_App & Start_App & End_App & Const_App & Color_App & "]"

' events: [{ "id": 2, "title": "title of 2", "start": "2013-09-02T10:00:00", "end": "2013-09-02T11:01:00", "allDay": false, "color": "black" }, { "id": 3, "title": "title of 3", "start": "2013-09-02T13:00:00", "end": "2013-09-02T18:01:00", "allDay": false, "color": "red"}]

End While

myreader1.Close()

myreader1.Dispose()
Command_Read.Dispose()

conn.Close()
Return Risultati_Appuntamenti