Excerpt |
---|
Streams the PowerPointTemplate to the client. |
Signature |
---|
C# | C# | Wiki Markup |
---|
{description}
{excerpt}Streams the PowerPointTemplate to the client.{excerpt}
{signature:C#} public void Save(System.Web.HttpResponse response) |
Signature |
---|
{signature}
{signature:vb.net | vb.net | }Public Sub Save(ByRef response As System.Web.HttpResponse) |
...
An HttpResponse to write the resulting PowerPoint file to.
Exception |
---|
InvalidOperationException | InvalidOperationException | Save will throw this exception if it does not have a PowerPoint document handle (Save cannot be called before Open ).
|
Remarks |
---|
If the user chooses to open rather than save the file, it will open in the browser window. PowerPointWriter will set a default name for the file. To set a different file name and/or open the file in Microsoft PowerPoint, use the signature {signature}
{parameters}{param:response}An HttpResponse to write the resulting PowerPoint file to.{param}
{exceptions}{exception:InvalidOperationException}
{{Save}} will throw this exception if it does not have a PowerPoint document handle ({{Save}} cannot be called before {{Open}}).
{exception}
{remarks}
If the user chooses to open rather than save the file, it will open in the browser window. PowerPointWriter will set a default name for the file. To set a different file name and/or open the file in Microsoft PowerPoint, use the signature [Save(HttpResponse,String,Bool) You can call Save more than once for a single instance of PowerPointTemplate. This allows you to save more than one copy of a generated file, and/or both save the file on the server and stream it to the client. |
Example |
---|
Code Block |
---|
| csharp | csharp |
title | C# |
---|
|PowerPointTemplate.Save(System.Web.HttpResponse, String, Boolean)]
You can call {{Save}} more than once for a single instance of [PowerPointTemplate]. This allows you to save more than one copy of a generated file, and/or both save the file on the server and stream it to the client.
{remarks}
{example}{code:csharp|title=C#}
using (PowerPointTemplate ppt = new PowerPointTemplate())
{
ppt.Open("MyInputFilePath.pptx");
// where response is the HttpResponse for the current page
ppt.Save(response);
}
{code}
{example}