Description
If you pass Save an HttpResponse object object, WordWriter will stream the generated file to the client. If the user chooses to open (rather than save) the file, it will open in the browser window.
C#
public void Save(System.Web.HttpResponse response)
vb.net
Public Sub Save(ByVal response As System.Web.HttpResponse)
Parameters
response
The page'sHttpResponse object.
Exceptions
ArgumentNullException
Save will throw this exception if null (C#) or Nothing (VB.NET) is passed to the method.
Remarks
You can callSave more than once for a single instance of WordTemplate. 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.
Examples
C#
...
WordTemplate oWW = new WordTemplate();
oWW.Open(Server.MapPath(@"./StringVarTemplate.doc"));
oWW.SetDataSource(MyDataTable);
oWW.Process();
oWW.Save(Page.Response);
vb.net
...
Dim oWW As New WordTemplate()
oWW.Open(Server.MapPath("./StringVarTemplate.doc"))
oWW.SetDataSource(MyDataTable)
oWW.Process()
oWW.Save(Page.Response)
