Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4256146
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T05:18:52+00:00 2026-05-21T05:18:52+00:00

I have implemented JQuery FullCalendar by fetching the events dynamically from an aspx page.

  • 0

I have implemented JQuery FullCalendar by fetching the events dynamically from an aspx page. But it is not displaying the events on the calendar. But if I manually add the page response to the events attribute, it works fine. Can anybody please help what would be the issue? Here is my code.

$('#calendar').fullCalendar({
        theme: true,
        header: {
            left: 'prev,next today',
            center: 'title',
            right: 'month,agendaWeek,agendaDay'
        },
        //events: "GetCalendarEvents.aspx?id=2612&role=supervisor"  --->not working
 // works fine if i add the above page's response to the events manually as shown below
        events: [
                {
                    "id": 1,
                    "title": "Family Sick - Unsubstantiated",
                    "start": "2011-03-21 08:00:00",
                    "end": "2011-03-22 17:00:00",
                    "editable": false,
                    "url": "LeaveRequestForm.aspx?id=1"
                },
                {
                    "id": 2,
                    "title": "Family Medical Leave",
                    "start": "2011-04-25 13:00:00",
                    "end": "2011-04-25 17:00:00",
                    "editable": false,
                    "url": "LeaveRequestForm.aspx?id=1"
                },
                {
                    "id": 3,
                    "title": "Vacation",
                    "start": "2011-04-14 08:00:00",
                    "end": "2011-04-16 17:00:00",
                    "editable": false,
                    "url": "LeaveRequestForm.aspx?id=2"
                },
                {
                    "id": 4,
                    "title": "Training",
                    "start": "2011-04-12 08:00:00",
                    "end": "2011-04-12 17:00:00",
                    "editable": false,
                    "url": "LeaveRequestForm.aspx?id=2"
                }

            ]

    });

GetCalendarEvents.aspx codebehind:

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    Dim dbAPD As DBAPDData = New DBAPDData()
    Dim util As Utils = New Utils()
    Dim approverID As String = ""
    Dim approverRole As String = ""

    If (Request.QueryString("id") IsNot Nothing) Then
        approverID = Request.QueryString("id").Trim()
    End If

    If (Request.QueryString("role") IsNot Nothing) Then
        approverRole = Request.QueryString("role").Trim()
    End If

    Dim eventsList As List(Of CalendarEvent) = New List(Of CalendarEvent)()

    Dim ds As DataSet = dbAPD.GetLeaveRequestDetailsByApprover(approverID, approverRole, 2) 'LeaveStatusCode = 2 --> Approved
    If (ds.Tables(0).Rows.Count > 0) Then

        For Each dr As DataRow In ds.Tables(0).Rows

            Dim calEvent As CalendarEvent = New CalendarEvent()

            calEvent.id = If(IsDBNull(dr("LeaveRequestDetailsID")), 0, Convert.ToInt32(dr("LeaveRequestDetailsID")))
            calEvent.title = If(IsDBNull(dr("LeaveCode")), "", dbAPD.GetLeaveCodeDescription(Convert.ToString(dr("LeaveCode"))))
            calEvent.url = If(IsDBNull(dr("LeaveRequestID")), "", "LeaveRequestForm.aspx?id=" + Convert.ToString(dr("LeaveRequestID")))


            calEvent.start = If(IsDBNull(dr("FromDate")), "", String.Format("{0:yyyy-MM-dd HH:mm:ss}", Convert.ToDateTime(dr("FromDate"))))
            calEvent.end = If(IsDBNull(dr("ToDate")), "", String.Format("{0:yyyy-MM-dd HH:mm:ss}", Convert.ToDateTime(dr("ToDate"))))

            eventsList.Add(calEvent)

        Next

    End If

    ' Serialize the return value .
    Dim js As New System.Web.Script.Serialization.JavaScriptSerializer
    Dim strEvents As String = js.Serialize(eventsList)

    Response.Clear()
    Response.Write(strEvents)

End Sub
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T05:18:53+00:00Added an answer on May 21, 2026 at 5:18 am

    I figured out the issue. In “GetCalendarEvents.aspx” code-behind file, I added the following line after Response.Write() and it worked fine.

    Response.End()
    

    Thanks

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have implemented the jquery thick box in my page to show another page
On my new customer page , I have successfully implemented a jQuery show/hide toggle
hai i am very new to jquery and jqgrid.. i have implemented a grid...but
This probably sounds really stupid but I have noo idea how to implement jquery's
I have implemented authentication systems for webapps several times over the years, but before
I have implemented through jQuery the placeholder HTML 5 attribute for the browsers that
I have implemented lightbox-plugin for jQuery of krewenki in a masterpage including all images.
I have a carousel implemented with jQuery. Sometimes I have other things on the
I have successfully implemented the scrollTo jQuery plugin which scrolls to the next div
I have just implemented the excellent jQuery UI autocomplete. http://jqueryui.com/demos/autocomplete/ There is a strange

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.