0
ASP.net을 사용하여 달력에 데이터를 표시하고 있습니다.달력에 aspx 페이지의 데이터가 표시되지 않습니다.
feed.aspx라는 페이지 (내 캘린더 페이지와 같은 폴더에 있음)에 표시 할 피드 설정이 있습니다. 내 캘린더 페이지에 다음과 같이 호출 :
events: {
url: 'feed.aspx',
type: 'POST',
data: {
custom_param1: 'something',
custom_param2: 'somethingelse'
},
error: function() {
alert('there was an error while fetching events!');
},
color: 'yellow', // a non-ajax option
textColor: 'black' // a non-ajax option
}
내 브라우저에서 feed.aspx를 볼 때 나는이 참조 :
{"title":"My Test Event","start":"2011-11-02T13:30:57","url":"http://orss.edu","allDay":"false"}
그래서 내 feed.aspx이 확인 작동하는지 알 수 있습니다.
하지만 시도 상관없이, 아니 달력 데이터가 표시되지 않습니다.
도움을 주시면 감사하겠습니다.
내 feed.aspx은 다음과 같습니다
확인Imports System.Web.Script.Serialization
Imports System.Data
Imports System.Data.SqlClient
Public Class feed
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim dbu As New Utilities.DBUtilities
Dim conn As SqlConnection
Dim cmd As SqlCommand
Dim cmdText As String = "SELECT top(100) * FROM pageList"
Dim dr As SqlDataReader
Dim dictData As New Dictionary(Of String, String)
cmd = dbu.getCommand(cmdText)
conn = cmd.Connection
dbu.getCommand(cmdText)
conn.Open()
dr = cmd.ExecuteReader()
If dr.HasRows Then
Dim i As Integer = 0
Do While dr.Read()
'Response.Write(dr.Item("pageID") & "<br>")
dictData.Add(i.ToString, dr.Item("pageDisplayName"))
i = i + 1
Loop
End If
Dim testDict As New Dictionary(Of String, String)
testDict.Add("title", "My Test Event")
testDict.Add("start", DateTime.Now.ToString("s"))
testDict.Add("url", "http://oss.edu")
testDict.Add("allDay", "false")
Dim serializer As New JavaScriptSerializer()
Dim json As String = serializer.Serialize(DirectCast(testDict, Object))
Response.Clear()
Response.Write(json)
Response.End()
End Sub
End Class