Closed im1dermike closed 9 years ago
I stumbled upon these SO posts which seem to indicate you'll never be able to open an ICS file in IE (or Opera) via javascript...
http://stackoverflow.com/questions/16566300/internet-explorer-8-and-vcalendar-ics-files
I came up with a work around. I changed the href on a.icon-outlook and a.icon-ical to point to a method on my controller in IE only. I pass the encoded calendar entry in the query string of the request. Then my server side method adds the code to the response.
public void GenerateCalendarEntry(string calendarEntry)
{
HttpContext.Response.ContentType = "text/calendar";
HttpContext.Response.AddHeader("Content-disposition", "attachment; filename=appointment.ics");
HttpContext.Response.Write(calendarEntry);
HttpContext.Response.End();
}
The subject says it all. Clicking on either link only opens a data:text/calendar link that can't be resolved. I'm using IE10 and all the other github issues are for previous version of IE. Has there been any resolution?