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

  • SEARCH
  • Home
  • 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 8508317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T03:07:45+00:00 2026-06-11T03:07:45+00:00

As a bunch of others I have a problem getting my JSON feed events

  • 0

As a bunch of others I have a problem getting my JSON feed events to render in the calendar. The problem is often wrong JSON formating, but this is not the case since I’ve validated it with JSONlint and hardcoded the JSON feed in Site.Master with positive result.

FireBug is getting the JSON response correctly but it is still not showing up in fullCalendar. I’m out of ideas.

The FireBug response:
[{“id”:1,”title”:”TESTTITLE”,”info”:”INFOINFOINFO”,”start”:”2012-08-20T12:00:00″,”end”:”2012-08-20T12:00:00″,”user”:1}]

JSON.aspx

public partial class JSON : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
    // Get events from db and add to list.
    DataClassesDataContext db = new DataClassesDataContext();
    List<calevent> eventList = db.calevents.ToList();

    // Select events and return datetime as sortable XML Schema style.
    var events = from ev in eventList
                 select new
                 {
                     id = ev.event_id,
                     title = ev.title,
                     info = ev.description,
                     start = ev.event_start.ToString("s"),
                     end = ev.event_end.ToString("s"),
                     user = ev.user_id
                 };

    // Serialize to JSON string.
    JavaScriptSerializer jss = new JavaScriptSerializer();
    String json = jss.Serialize(events);

    Response.Write(json);
    Response.End();
   }
}

Site.master

<link href="~/Styles/Site.css" rel="stylesheet" type="text/css" />    
<link href='fullcalendar/fullcalendar.css' rel='stylesheet' type='text/css' />
<script src='jquery/jquery-1.7.1.min.js' type='text/javascript'></script>
<script src='fullcalendar/fullcalendar.js' type='text/javascript' ></script>
<script type="text/javascript">
     $(document).ready(function () {
         $('#fullcal').fullCalendar({

            eventClick: function() {
                alert('a day has been clicked!');
            },
          events: 'JSON.aspx' 
         })
     });
</script>

I’ve been scanning related questions for days but none of them seems to fix mine…

  • 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-06-11T03:07:47+00:00Added an answer on June 11, 2026 at 3:07 am

    Try this , you have to have a webmethod in aspx file that fullcalendar can call asynchronously

           $(document).ready(function () {
            $('#fullcal').fullCalendar({
            eventClick: function() {
                alert('a day has been clicked!');
            }, 
                events: function (start, end, callback) {
                $.ajax({
                    type: "POST",    //WebMethods will not allow GET
                    url: "json.aspx/GetEvents",   //url of a webmethod - example below
                    data: "{'userID':'" + $('#<%= hidUserID.ClientID %>').val() + "'}",  //this is what I use to pass who's calendar it is 
                    //completely take out 'data:' line if you don't want to pass to webmethod - Important to also change webmethod to not accept any parameters 
                    contentType: "application/json; charset=utf-8",  
                    dataType: "json",
                    success: function (doc) {
                        var events = [];   //javascript event object created here
                        var obj = $.parseJSON(doc.d);  //.net returns json wrapped in "d"
                        $(obj.event).each(function () { //yours is obj.calevent                          
                                events.push({
                                title: $(this).attr('title'),  //your calevent object has identical parameters 'title', 'start', ect, so this will work
                                start: $(this).attr('start'), // will be parsed into DateTime object    
                                end: $(this).attr('end'),
                                id: $(this).attr('id')
                            });
                        });                     
                        callback(events);
                    }
                });
            }
           })
    

    then this would be in json.aspx

    [WebMethod(EnableSession = true)]
    public static string GetEvents(string userID)
    {
        DataClassesDataContext db = new DataClassesDataContext();
    List<calevent> eventList = db.calevents.ToList();
    
    // Select events and return datetime as sortable XML Schema style.
    var events = from ev in eventList
                 select new
                 {
                     id = ev.event_id,
                     title = ev.title,
                     info = ev.description,
                     start = ev.event_start.ToString("s"),
                     end = ev.event_end.ToString("s"),
                     user = ev.user_id
                 };
    
    // Serialize to JSON string.
    JavaScriptSerializer jss = new JavaScriptSerializer();
    String json = jss.Serialize(events);
    return json;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There a bunch of other questions like this, but the only substantial answer I've
I need to finish others developer work but problem is that he started in
This error very strange. I have a bunch of properties in app delegate which
I have a problem where only some markers are showing and not others. I
This question is related to others I have asked on here, mainly regarding sorting
This seems like a common problem, but I'm unable find an adequate solution. I'm
So I have a bunch of buttons on a page, interspersed with other HTML,
I have a bunch of business class with autoproperties : public class A {
I have a whole bunch of buttons that all need to have both a
I'm running a bunch of local Kiosks on mac mini's and have been using

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.