コードビハインドにこれがあります:
ScriptManager.RegisterStartupScript(this, typeof(string), Guid.NewGuid().ToString().Replace("-", ""), "window.setTimeout(\" $('#" + calendar.ID + "').fullCalendar({header: {left: 'prev,next today',center: 'title',right: 'month,agendaWeek,agendaDay'},aspectRatio: 2.2,editable: true,events: " + sJSON + ", eventClick: function(event) { OpenModal('Novo Compromisso','100%','500px','/agenda/form.aspx?compromissoid=event.id');}});\",100);", true);
データを取得し、カレンダーのイベント プロパティを読み込みます。eventClick で、event.id にアクセスしてモーダル ウィンドウを開き、イベントを編集したいと考えています。しかし、クエリ文字列は文字通り「event.id」に設定されています。
event.id に値があるかどうかを確認しました。以下に示すように、alert() 関数に表示されるためです。
ScriptManager.RegisterStartupScript(this, typeof(string), Guid.NewGuid().ToString().Replace("-", ""), "window.setTimeout(\" $('#" + calendar.ID + "').fullCalendar({header: {left: 'prev,next today',center: 'title',right: 'month,agendaWeek,agendaDay'},aspectRatio: 2.2,editable: true,events: " + sJSON + ", eventClick: function(event) { alert(event.id); OpenModal('Novo Compromisso','100%','500px','/agenda/form.aspx?compromissoid=event.id');}});\",100);", true);
では、どうすれば event.id 値をクエリ文字列として使用できますか?