NOt Prompted to save when saving using output.streams

I applied the snippet of sample code provided in the documentation for saving presentations to create a blank slide and save it. However I am not prompted when I step through and run the code. The code is below. I've commented out hte response.end statement since it was generating a "thread aborted error". Note: the form that this code is in is being called via AJAX.

Ajax code:

function getPrintableHTML()

{

var printHTML

//alert(parent.frames[1].document.documentElement.innerHTML);

printHTML=encodeURIComponent("" + parent.frames[1].document.documentElement.innerHTML + "");

var params = "&printHTML=" + encodeURIComponent(printHTML);

//var params = "&printHTML=1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111";

// Make the Ajax call and pass in the parameters.

ajaxCall = makeSyncAjaxTextRequest("PowerpointConverter.aspx", params);

}

function makeSyncAjaxTextRequest(url, params)

{

getHTTPRequestObject();

XMLHttp.open("POST", url, false);

//XMLHttp.setRequestHeader("Content-Type", "text/html");

XMLHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");

XMLHttp.setRequestHeader("Content-length", params.length);

XMLHttp.send(params);

return XMLHttp.responseText;

}

Thanks

Dim pres As Presentation = New Presentation()

'....do some work here.....

Try

'Setting the content type of the Http Response

Me.Response.ContentType = "application/vnd.ms-powerpoint"

'Appending the header of the Http Response to contain the presentation file name

Me.Response.AppendHeader("Content-Disposition", "attachment; filename=demo.ppt")

'Flushing the buffers of Http Response

Me.Response.Flush()

'Accessing the output stream of Http Response

Dim st As System.IO.Stream = Me.Response.OutputStream

'Saving the presentation to the output stream of Http Response

pres.Write(st)

'Closing the Http Response

'Me.Response.End()

Catch Err As Exception

Throw Err

End Try

Hi,

I have just cheched the code provided by you in a simple ASP.NET web site and it is working fine. First you should test it without Ajax and later on with AJAX.

Indeed when called without AJAX it works fine. Trying determine what is is with calling the page containing the code that causes the failure.

Hi,

It means this issue is more related with AJAX capability / architecture and the AJAX code written by you, otherwise there is no such limitation as far as "Aspose.Slides for .NET" capability is concerned.