This is a migrated thread and some comments may be shown as answers.

how to export ics in html format?

1 Answer 129 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Doug
Top achievements
Rank 1
Doug asked on 26 Sep 2017, 07:33 PM
perhaps just a setting in
response.ContentType = "text/calendar" ?
or is there something that can be done when getting the data?

Dim data As String = Server.HtmlDecode(RadScheduler.ExportToICalendar(LoadContent()))

is there some setting to set to tell it to export the way to make it HTML?

1 Answer, 1 is accepted

Sort by
0
Doug
Top achievements
Rank 1
answered on 26 Oct 2017, 02:54 PM
I kinda of hacked the export to remove the Z in the time and insert the content as html
here is my hack
I got errors unless I removed all breakline (vbcrlf) from the content part
note: LoadContent just returns an appointment
Dim data As String = RadScheduler.ExportToICalendar(LoadContent(tzid, content))
' data = data.Replace("DTSTART:", "DTSTART;TZID=""" & tzid & """:").Replace("DTEND:", "DTEND;TZID=""" & tzid & """:")
data = data.Replace("0Z", "0")
Dim iPos As Integer = data.IndexOf("DESCRIPTION:")
data = data.Substring(0, iPos)
 
data = data & "X-ALT-DESC;FMTTYPE=text/html:<html>" & _
      "<head></head><body>" & Server.HtmlDecode(content).Replace(vbCrLf, "").Replace(vbCr, "").Replace(vbLf, "") & "</body></html>" & vbCrLf & _
      "END:VEVENT" & vbCrLf & _
      "END:VCALENDAR" & vbCrLf
Tags
Scheduler
Asked by
Doug
Top achievements
Rank 1
Answers by
Doug
Top achievements
Rank 1
Share this question
or