
at the end of the project I have to create a pdf file with all the results from the input of this page.
So i place a ImageButton on the page. This button should not be shown at every situation. So i make it visible or not and put it to the RadAjaxManger. With a third party tool from expertPDF (www.html-to-pdf.net) I want to create my pdf after clicking on the image button.
And than I get the same problem described in this posting:
http://www.codeproject.com/Messages/2617925/ASP-Net-AJAX-Response-Write-and-PDF.aspx
I search for this problem for many hours and I am getting so unhappy now, because I want to filalize my project... please help me ...
thomas
4 Answers, 1 is accepted
This topic will help you sidestep the problem easily:
Export from ajaxified grid
Best regards,
Daniel
the Telerik team

i know this code and i try it in this way.
Concrete i put in the master page with include my immagebutto ibtPdf
<telerik:RadPane ID="Fusszeile" runat="server" Height="37" BackColor="#5e696a" Scrolling="None">
<div id="FooterNav" runat="server" class="footer_nav_right">
<div style="margin-right: 30px; float: right">
<asp:ImageButton ID="ibtPdf" runat="server" ImageUrl="Images/create_pdf.png" ToolTip="create PDF" OnClick="ibtPdf_Click"
Visible="true" />
</div>
the following javascript
<
telerik:RadCodeBlock ID="RadCodeBlock2" runat="server">
<script type="text/javascript">
function onRequestStart(ajaxManager, eventArgs) {
if (eventArgs.EventTarget.indexOf("ibtPDF") != -1) {
eventArgs.EnableAjax =
false;
}
}
</script>
</
telerik:RadCodeBlock>
and the following code for the AjaxManager
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest" EnableAJAX="True" ClientEvents-OnRequestStart="onRequestStart">
<ClientEvents OnRequestStart="onRequestStart" />
<telerik:AjaxSetting AjaxControlID="radMainMenu">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="pnlPageInfoBoxHeaderText" />
<telerik:AjaxUpdatedControl ControlID="RedBarText" />
<telerik:AjaxUpdatedControl ControlID="CalculatorWizard" />
<telerik:AjaxUpdatedControl ControlID="MovePreviousButton" />
<telerik:AjaxUpdatedControl ControlID="MoveNextButton" />
<%
--<telerik:AjaxUpdatedControl ControlID="ibtPdf" />--%> <telerik:AjaxUpdatedControl ControlID="ibtPdf" />
<telerik:AjaxUpdatedControl ControlID="ibtSendEmail" />
<telerik:AjaxUpdatedControl ControlID="divPageInfoTooltip" />
</UpdatedControls>
</telerik:AjaxSetting>
but i get on error in the file TransientScriptDocument164.axd at the following code
try
{a._webRequest.completed(Sys.EventArgs.Empty)}finally{if(a._xmlHttpRequest!=null)
Laufzeitfehler in Microsoft JScript: Sys.WebForms.PageRequestManagerParserErrorException: Die vom Server empfangene Nachricht konnte nicht analysiert werden. Häufige Ursachen für diesen Fehler sind: Änderung der Antwort durch Aufrufe von Response.Write(), Antwortfilter, HttpModules oder aktivierte Serverablaufverfolgung.
Details: Fehler beim Analysieren in der Nähe von "%PDF-1.4
%????
%Cr".
When i put a breakpoint to the javascript it stops at every situation but not when i click my immagebutton.
Please help me, i have no father idears.
thanks
thomas
You have to add a separate setting for the initiator button - otherwise the event won't be triggered when you click on the export button.
<
telerik:AjaxSetting
AjaxControlID
=
"ibtPdf"
>
<
UpdatedControls
>
....
</
UpdatedControls
>
</
telerik:AjaxSetting
>
Also I noticed that you have attached the OnRequestStart event twice.
Best regards,
Daniel
the Telerik team

Thank for the your very good support and your nice development tool
Fantastic
thomas