search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

'DayPilot' is undefined

Asked by Vincenzo Papa
9 years ago.

Hello, i have a problem with demo version
i created a aspx page with calendar elements, and i created the same datatable on the example,
but internet explorer look the error 'DayPilot' is undefined....
why ?
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
DayPilotCalendar1.DataSource = getData()
DataBind()

End Sub

Public Function getData() As Data.DataTable
Dim dt As Data.DataTable
dt = New Data.DataTable

dt.Columns.Add("start", GetType(DateTime))
dt.Columns.Add("end", GetType(DateTime))
dt.Columns.Add("name", GetType(String))
dt.Columns.Add("id", GetType(String))

Dim dr As Data.DataRow = dt.NewRow()
dr("id") = 0
dr("start") = Convert.ToDateTime("15:50")
dr("end") = Convert.ToDateTime("15:55")
dr("name") = "Event 1"
dt.Rows.Add(dr)

dr = dt.NewRow()
dr("id") = 1
dr("start") = Convert.ToDateTime("16:00")
dr("end") = Convert.ToDateTime("17:00")
dr("name") = "Event 2"
dt.Rows.Add(dr)

dr = dt.NewRow()
dr("id") = 2
dr("start") = Convert.ToDateTime("16:15")
dr("end") = Convert.ToDateTime("18:45")
dr("name") = "Event 3"
dt.Rows.Add(dr)
Return dt
End Function
End Class

Comment posted by Dan Letecky [DayPilot]
9 years ago.

It looks like the scripts were not included properly. This is done automatically by the control: If you look at the html source of the resulting page (not the .aspx file) you will see several <script> references to URLs that contain ...WebResource.axd?d= ..... These links are generated by DayPilot. They load the scripts from the DayPilot.dll using standard ASP.NET mechanisms.

If you copy the url and open in it the browser you will see why it was not loading properly (most likely you will see an error message). There might be a problem if you are doing URL rewriting (e.g. using a HttpModule) or if there is a problem in web.config.

If you post the error message here I will be able to give more hints.

This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.