Well I figured out a way that would work for me. In my aspx page here is the script to display the Calendar:
<script type="text/javascript">
$(document).ready(function() {
$('#calendar').fullCalendar({
events: "/Calendar/CalendarData"
,
eventClick: function(event) {
__doPostBack("EventPost_Clicked", event.id);
}
});
});
</script>
The eventClick function part catches the id of the event and sends it back to my controller. Inside my controller:
public ActionResult Calendar()
{
if (Request.HttpMethod == "POST")
{
if (Request.Form["AddEvent"] != null)
{
return RedirectToAction("AddEvent", "Calendar");
}
else if (Request.Form["__EVENTTARGET"] == "EventPost_Clicked")
{
string Eid = Request.Form["__EVENTARGUMENT"];
return RedirectToAction("EditEvent", "Calendar", new {eventId = Eid });
}
}
return View();
}
The felse if catches the postback and would send it to an editevent page with the necessary event id.
I hope my struggle helps someone else.