how to export ics in html format?

2 posts, 0 answers
  1. Doug
    Doug avatar
    103 posts
    Member since:
    Aug 2014

    Posted 26 Sep Link to this post

    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?
  2. Doug
    Doug avatar
    103 posts
    Member since:
    Aug 2014

    Posted 26 Oct in reply to Doug Link to this post

    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
Back to Top