Jill-Connie Lorentsen
Top achievements
Rank 1
Jill-Connie Lorentsen
asked on 10 Jan 2013, 09:54 AM
I use ExportToPdf() to do just that.
When the file is opened on the client, buttons for saving, printing etc are shown at the bottom. How do I set the default path and filename for the "Save as" dialog?
Regards, Jill-Connie Lorentsen
When the file is opened on the client, buttons for saving, printing etc are shown at the bottom. How do I set the default path and filename for the "Save as" dialog?
Regards, Jill-Connie Lorentsen
10 Answers, 1 is accepted
0
Princy
Top achievements
Rank 2
answered on 10 Jan 2013, 10:34 AM
Hi,
As far as I know, setting default path is browser dependant. Try setting the following for export only data.
aspx:
Thanks,
Princy.
As far as I know, setting default path is browser dependant. Try setting the following for export only data.
aspx:
<ExportSettings FileName="test" ExportOnlyData="true"></ExportSettings>Thanks,
Princy.
0
Jill-Connie Lorentsen
Top achievements
Rank 1
answered on 10 Jan 2013, 11:23 AM
Thank you for your reply, but it made no difference.
0
Princy
Top achievements
Rank 2
answered on 11 Jan 2013, 06:35 AM
Hi,
Unfortunately I couldn't replicate the issue at my end. Please provide your code where I can replicate this behavior.
Thanks,
Princy
Unfortunately I couldn't replicate the issue at my end. Please provide your code where I can replicate this behavior.
Thanks,
Princy
0
Jill-Connie Lorentsen
Top achievements
Rank 1
answered on 14 Jan 2013, 09:54 AM
I set ExportOnlyData=true, but the Save as dialog still opened with default path and filename.
Regards, Jill-Connie
Regards, Jill-Connie
<ExportSettings IgnorePaging="true" OpenInNewWindow="false" FileName="Program" ExportOnlyData="True"> <Pdf AllowAdd="false" AllowCopy="true" AllowModify="true" AllowPrinting="true" Author="Anonymous" Keywords="None" PageTitle="Program for choir" Subject="Program for choir" Title="Program for choir" PaperSize="A4" PageWidth="297mm" PageHeight="210mm" /> </ExportSettings>0
Hello Jill-Connie,
I'm afraid there is no way to specify default path for file dialog.
That said, in my opinion the suggestion to use ExportOnlyData is meant to address the first question.
Best regards,
Daniel
the Telerik team
I'm afraid there is no way to specify default path for file dialog.
That said, in my opinion the suggestion to use ExportOnlyData is meant to address the first question.
Best regards,
Daniel
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Jill-Connie Lorentsen
Top achievements
Rank 1
answered on 06 Mar 2013, 11:28 AM
I've been busy with other issues, and now I am back to this.
I can live with the user having to choose the path himself.
But, is there really no way to set a filename in the "Save as..." dialog? Now the name of the web page comes up, which is not what I want at all.
Regards, Jill-Connie Lorentsen
I can live with the user having to choose the path himself.
But, is there really no way to set a filename in the "Save as..." dialog? Now the name of the web page comes up, which is not what I want at all.
Regards, Jill-Connie Lorentsen
0
Hello Jill-Connie,
You can set the file name via the FileName property in ExportSettings:
Export overview
Kind regards,
Daniel
the Telerik team
You can set the file name via the FileName property in ExportSettings:
<ExportSettings FileName="YourFileName" ... />Export overview
Kind regards,
Daniel
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Jill-Connie Lorentsen
Top achievements
Rank 1
answered on 13 Mar 2013, 09:52 AM
This is true if I want to save the file automatically.
But I want the user to view the pdf, and then press the "Save as..." button at the bottom of the document. When the dialog then opens the filename shown is the name of the page, which is not very useful.
But I want the user to view the pdf, and then press the "Save as..." button at the bottom of the document. When the dialog then opens the filename shown is the name of the page, which is not very useful.
0
Hello Jill-Connie,
I suppose you are testing this in IE with OpenInNewWindow set to false (default). It is Internet Explorer who ignores the file name when the content disposition header is set to inline.
The solution would be to enable the OpenInNewWindow property which will force the aforementioned header value to "attachment".
Best regards,
Daniel
the Telerik team
I suppose you are testing this in IE with OpenInNewWindow set to false (default). It is Internet Explorer who ignores the file name when the content disposition header is set to inline.
The solution would be to enable the OpenInNewWindow property which will force the aforementioned header value to "attachment".
Best regards,
Daniel
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Jill-Connie Lorentsen
Top achievements
Rank 1
answered on 19 Mar 2013, 09:44 AM
I am testing with Opera.
But never mind, - I have implemented my own "Save as..." functionality
But never mind, - I have implemented my own "Save as..." functionality