public ContentResult Subscribe(string eventId) { var eventPart = _eventService.GetEventPart(eventId, VersionOptions.Latest); var ics = _eventService.GetEventIcs(eventPart); var downloadFileName = ics.Title.Replace(' ', '_') + ".ics"; const string contentType = "text/iCal"; var response = new iCalFormatResult(contentType, ics); //response.FileDownloadName = downloadFileName; return response; }
public ContentResult SubscribeIcs(string calendarId, string fileName) { var ics = _calendarService.CreateCalendarViewModel(calendarId); //var downloadFileName = ics.Title.Replace(' ', '_') + ".ics"; const string contentType = "text/calendar"; var response = new iCalFormatResult(contentType, ics); var stringContent = response.getResponseAsString(); return Content(stringContent, contentType, System.Text.Encoding.UTF8); //response.FileDownloadName = downloadFileName; //return response; }
public ContentResult Subscribe(string calendarId) { var ics = _calendarService.CreateCalendarViewModel(calendarId); //var downloadFileName = ics.Title.Replace(' ', '_') + ".ics"; const string contentType = "text/calendar"; var response = new iCalFormatResult(contentType, ics); //response.FileDownloadName = downloadFileName; return response; }