Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

Description

Excerpt

Streams the PowerPointTemplate to the client. This method allows you to specify a default client-side file name, and whether the file should be opened in the browser window or in Microsoft PowerPoint.

Signature
C#
C#
Public void Save(System.Web.HttpResponse response, System.String attachementName, boolean openInBrowser)
{signature}{signature:
}
Signature
vb.net
vb.net
Public Sub Save(ByRef response As System.Web.HttpResponse, ByVal attachmentName As String, ByVal openInBrowser As Boolean
{signature}

{parameters}
{param:response}An HttpResponse to write the resulting PowerPoint file to.{param}
{param:attachmentName}Specifies a name for the generated Excel file; this name will be displayed in the download dialog when the file is streamed to the browser.{param}
{param:openInBrowser}If {{openInBrowser}} is set to {{true}}, and the user chooses to open the file, the file will open in the browser window.{param}
{example}
h6. Stream to the client and open in PowerPoint
When you pass an HttpResponse object to {{Save}}, PowerPointWriter will stream the generated PowerPoint file to the client. The browser will display a File Download dialog asking the user to open or save the file. The method's second parameter specifies a file name to display in the File Download dialog. If the method's third parameter {{openInBrowser}} is {{false}} and the user chooses to open the Excel file, the file will open in Microsoft PowerPoint.
{code:csharp|title=C#}
Parameters
Param
response
response

An HttpResponse to write the resulting PowerPoint file to.

Param
attachmentName
attachmentName

Specifies a name for the generated Excel file; this name will be displayed in the download dialog when the file is streamed to the browser.

Param
openInBrowser
openInBrowser

If openInBrowser is set to true, and the user chooses to open the file, the file will open in the browser window.

Example
Stream to the client and open in PowerPoint

When you pass an HttpResponse object to Save, PowerPointWriter will stream the generated PowerPoint file to the client. The browser will display a File Download dialog asking the user to open or save the file. The method's second parameter specifies a file name to display in the File Download dialog. If the method's third parameter openInBrowser is false and the user chooses to open the Excel file, the file will open in Microsoft PowerPoint.

Code Block
csharp
csharp
titleC#


            //--- Stream to the client
            //--- "Output.pptx" will appear in the Save As dialog
            //--- The file will open in PowerPoint
            pptTemplate.Save(Page.Response, "Output.pptx", false);

{code} {code:vbnet|title=
Code Block
vbnet
vbnet
titlevb.net
}


            '--- Stream to the client
            '--- "Output.pptx" will appear in the Save As dialog
            '--- The file will open in PowerPoint
            pptTemplate.Save(Page.Response, "Output.pptx", False)
{code} h6. Stream to the client and open in the browser window When you pass an HttpResponse object to {{Save}}, PowerPointWriter will stream the generated PowerPoint file to the client. The browser will display a File Download dialog asking the user to open or save the file. The method's second parameter specifies a file name to display in the File Download dialog. If the method's third parameter \- [openInBrowser|#param-openInBrowser] \- is True and the user chooses to open the PowerPoint file, the file will open in the browser window. {code:csharp|title=C#}
Stream to the client and open in the browser window

When you pass an HttpResponse object to Save, PowerPointWriter will stream the generated PowerPoint file to the client. The browser will display a File Download dialog asking the user to open or save the file. The method's second parameter specifies a file name to display in the File Download dialog. If the method's third parameter - openInBrowser - is True and the user chooses to open the PowerPoint file, the file will open in the browser window.

Code Block
csharp
csharp
titleC#

            //--- Stream to the client
            //--- "Output.pptx" will appear in the Save As dialog
            //--- The file will open in the browser's Excel 2007 plug-in
            pptTemplate.Save(Page.Response, "Output.pptx", true);
{code} {code:vbnet|title=
Code Block
vbnet
vbnet
titlevb.net
}

            '--- Stream to the client
            '--- "Output.pptx" will appear in the Save As dialog
            '--- The file will open in the browser's PowerPoint plug-in
            pptTemplate.Save(Page.Response, "Output.pptx", True)
{code} {example}