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

problems with export to outlook

3 Answers 54 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
ALBERT
Top achievements
Rank 1
ALBERT asked on 17 Feb 2011, 05:01 PM

 have the following code to export and I get this error:
Code:

 

 

 

 

 

 

 

protected void RadScheduler1_AppointmentCommand(object sender, AppointmentCommandEventArgs e)

 

 

{

 

 

 

    if (e.CommandName == "Export")

 

 

    {

 

        WriteCalendar(

 

RadScheduler.ExportToICalendar(e.Container.Appointment));

 

 

     }

 

}

 

 

private

 

 

void WriteCalendar(string data)

 

 

{

 

 

 

HttpResponse response = Page.Response;

 

 

 

 

 

 

response.End();

 

 

 

response.Clear();

 

response.Buffer =

 

true;

 

 

response.ContentType =

 

"text/calendar";

 

 

response.ContentEncoding =

 

Encoding.UTF8;

 

 

response.Charset =

 

"utf-8";

 

 

response.AddHeader(

 

"Content-Disposition", "attachment;filename=\"RadSchedulerExport.ics\"");

 

 

response.Write(data);

 

response.End();

 

}


htm in the code:

 

function Export(sender, e)

 

 

{

 

$find(

 

"<%# RadAjaxManager1.ClientID %>").__doPostBack(sender.name, "");

 

 

}

<

 

telerik:RadScheduler ID="RadScheduler1" runat="server" Skin="Hay" StartInsertingInAdvancedForm="True"

 

 

OnAppointmentDelete="RadScheduler1_AppointmentDelete" OnAppointmentUpdate="RadScheduler1_AppointmentUpdate"

 

 

OnAppointmentInsert="RadScheduler1_AppointmentInsert" OnNavigationComplete="RadScheduler1_NavigationComplete"

 

 

Height="550px" Width="800px" CustomAttributeNames="Engagement,CodigoEmpleado"

 

 

OnAppointmentDataBound="RadScheduler1_AppointmentDataBound" ShowFooter="False"

 

 

DayStartTime="07:00:00" WorkDayEndTime="18:00:00" WorkDayStartTime="07:00:00"

 

 

OnAppointmentCreated="RadScheduler1_AppointmentCreated" OnFormCreating="RadScheduler1_FormCreating"

 

 

OnFormCreated="RadScheduler1_FormCreated" EnableDescriptionField="True" BorderStyle="Solid"

 

 

EnableCustomAttributeEditing="True" OnAppointmentCommand="RadScheduler1_AppointmentCommand">

 

 

<TimelineView UserSelectable="False" />

 

 

<AppointmentTemplate>

 

 

<span style="font-weight: bold; font-size: small">

 

 

<div>

 

<%

# Eval("Subject") %>

 

 

 

 

<asp:Button runat="server" ID="Button1" CssClass="rsExportButton" ToolTip="Exportar reserva"

 

 

CommandName="Export" OnClientClick="Export(this, event); return false;" Style="cursor: pointer;

 

 

cursor: hand;"

 

 

/>

 

 

</div>

 

 

</span>

 

<%

# Eval("Resources[0].text") %>

 

 

 

 

<div>

 

<%

# Eval("Resources[1].text")%>

 

 

 

 

</div>

 

 

</AppointmentTemplate>

 

 

<TimeSlotContextMenuSettings EnableDefault="True" />

 

 

<AppointmentContextMenuSettings EnableDefault="True" />

 

 

<AdvancedForm Modal="True" EnableCustomAttributeEditing="True" />

 

 

<WeekView DayStartTime="07:00:00" WorkDayEndTime="18:00:00" WorkDayStartTime="07:00:00" />

 

 

<Localization AdvancedAllDayEvent="Todo el d&#237;a" AllDay="Todo el d&#237;a" AdvancedEditAppointment="Modificar Reserva"

 

 

AdvancedNewAppointment="Nueva Reserva" Cancel="Cancelar" ConfirmDeleteText="Esta seguro de querer eliminar la reserva?"

 

 

Save="Guardar" />

 

 

<DayView DayStartTime="07:00:00" WorkDayEndTime="18:00:00" WorkDayStartTime="07:00:00" />

 

 

</telerik:RadScheduler>

 

the error that throws me is:
Sys.webforms.PageRequestManagerParseErrorException: the message received the server could not be parsed. Common couses for this error are when the response is modified by call to Response.Write(), response filters HttpModules or server trace is enabled.
Details: error pasing near 'BEGIN:VCALENDAR VER'

that may be, thanks for your help

3 Answers, 1 is accepted

Sort by
0
Veronica
Telerik team
answered on 18 Feb 2011, 04:55 PM
Hi ALBERT,

I guess you are using our demo "iCalendar Export" as a reference. In the ticket info I see you are using version "2010. 3 1317". Is that correct?

Could you please send me your code so I can inspect it and help you?

Thank you!

Greetings,
Veronica Milcheva
the Telerik team
0
ALBERT
Top achievements
Rank 1
answered on 18 Feb 2011, 05:40 PM
The code you put up is that I am using in my application.
0
Veronica
Telerik team
answered on 21 Feb 2011, 10:28 AM
Hi ALBERT,

I've created a sample project to test the case. I tried to reproduce the issue but to no avail. I'm interested what is the version of RadControls that you use. In the Ticket Info I see version 2010.3 1317 and the sample project is tested with that version.

I am attaching the project so you can compare it with yours. Please check whether the problem appears and let me know how it goes.

All the best,
Veronica Milcheva
the Telerik team
Tags
Scheduler
Asked by
ALBERT
Top achievements
Rank 1
Answers by
Veronica
Telerik team
ALBERT
Top achievements
Rank 1
Share this question
or