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 3279154
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T19:33:39+00:00 2026-05-17T19:33:39+00:00

I am implementing the full calender in jquery in my asp.net mvc application by

  • 0

I am implementing the full calender in jquery in my asp.net mvc application by referring from here

but as per this blog it should be render the events on dates given in the controller action. but it is does not. i followed exact same steps . i checked many times there is no mistake. so why should be this happening? please guide me

Edited

Controller:

 public ActionResult CalendarData()
        {
            IList<CalendarDTO> tasksList = new List<CalendarDTO>();

            tasksList.Add(new CalendarDTO
            {
                id = 1,
                title = "Google search",
                start = ToUnixTimespan(DateTime.Now),
                end = ToUnixTimespan(DateTime.Now.AddHours(4)),
                url = "www.google.com"
            });
            tasksList.Add(new CalendarDTO
            {
                id = 1,
                title = "Bing search",
                start = ToUnixTimespan(DateTime.Now.AddDays(1)),
                end = ToUnixTimespan(DateTime.Now.AddDays(1).AddHours(4)),
                url = "www.bing.com"
            });

            return Json(tasksList);
        }

        private long ToUnixTimespan(DateTime date)
        {
            TimeSpan tspan = date.ToUniversalTime().Subtract(
     new DateTime(1970, 1, 1, 0, 0, 0));

            return (long)Math.Truncate(tspan.TotalSeconds);
        }

Added Class

public class CalendarDTO
    {
        public int id { get; set; }
        public string title { get; set; }
        public long start { get; set; }
        public long end { get; set; }
        public string url { get; set; }
    }

Site.Master

<title><asp:ContentPlaceHolder ID="TitleContent" runat="server" /></title>
<link href="../../Content/Site.css" rel="stylesheet" type="text/css" />
<link href="../../Content/fullcalendar.css" rel="stylesheet" type="text/css" />
<script src="../../Scripts/fullcalendar.js" type="text/javascript"></script>
<script src="../../Scripts/jquery-1.3.2.js" type="text/javascript"></script>

View Page I used Index page which given as default

   $(document).ready(function() {
       $('#calendar').fullCalendar({
           events: "/Home/CalendarData"
       });
   });  

And added div with id “calender”.
—————————————————————————————–
Edited Quetion 2

As you can see above my method returning the Json out put. but I am getting error as:
This request has been blocked because sensitive information could be disclosed to third party web sites when this is used in a GET request. To allow GET requests, set JsonRequestBehavior to AllowGet.

So I just add the parameter as JsonRequestBehavior.AllowGet to Json() .

but it is asking for download the json output file. rather than this it must be redirect to view as usual , right ? why should this is happening?

  • 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-17T19:33:39+00:00Added an answer on May 17, 2026 at 7:33 pm

    Probably a stupid question but did you include jquery-1.3.2.js and fullcalendar.js in your site? Remember that with the default ASP.NET MVC 2.0 project template, only jquery-1.4.1.js is included in the Scripts folder. Also I would recommend you downloading the latest versions of jquery and the fullCalendar plugin.

    Also here’s another gotcha when returning JSON in the CalendarData action:

    return Json(tasksList, JsonRequestBehavior.AllowGet);
    

    Contrary to ASP.NET MVC 1.0, in ASP.NET MVC 2.0 the JsonRequestBehavior.AllowGet is necessary if you want this action to be accessible over GET which is what I think the calendar plugin is doing.

    Of course you would have seen this error if you used FireBug to analyze the AJAX request/response data.

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

Sidebar

Related Questions

I'm looking at implementing tags in my ASP.NET website. After looking at several algorithms,
I am building a full text search facility for my website coded in asp.net
I'm implementing a tagging system for a website. There are multiple tags per object
I'm looking into implementing full text search on our Firebird database. Our requirements are:
I'm implementing full text search functionality on my rap website , and I'm running
My project has many reader and writer classes. I started implementing IDisposable, but I
Actually, maybe not full-blown Lex/Yacc. I'm implementing a command-interpreter front-end to administer a webapp.
On full .Net Framework I use the following code: socket.SetSocketOption( SocketOptionLevel.Socket, SocketOptionName.ReceiveTimeout, readTimeout); socket.SetSocketOption(
I am implementing a full text search API for my rails apps, and so
I am currently designing and implementing an application whereby a user can preview and

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.