We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Is this issue resolved?

Hello, I am having the exact same issue as this post: http://www.aspose.com/community/forums/153562/postback-problem-on-the-response-object/showthread.aspx#153562

Is this issue resolved?


Hi,


Attached is the latest version of Aspose.Cells of .NET v5.3.3.2. You may test you requirement with this version and let us know of your feedback.
Also, please see this post for your reference.

Hi,

Thanks for the information, I’ve tried using the updated version of Cells.
However, it works the same, pops up for saving the excel file correctly, but it doesn’t postback.
Would you have any work around to resolve this issue?

Thanks,

Hi Anna,


As communicated before, this issue is not related to or caused by Aspose.Cells API. You may confirm this through below source code. Any how, I vigorously searched the internet to find solutions or workarounds for such situations, but none worked for me. You may try yourself as well.

Following is my sample code for your reference which does not use Aspose.Cells and still the label does not gets updated.

f_Message.Text = “OUTPUT READY…”; // <<<<<<<<<This change is not seen in page after postback<o:p></o:p>

<o:p> </o:p>

//Create a Stream object<o:p></o:p>

FileStream fstream = new FileStream(“D:\book1.xls”, FileMode.Open);<o:p></o:p>

<o:p> </o:p>

byte[] Data = new Byte[fstream.Length];<o:p></o:p>

<o:p> </o:p>

//Obtain bytes from streams.<o:p></o:p>

fstream.Read(Data, 0, Data.Length);<o:p></o:p>

<o:p> </o:p>

fstream.Close();<o:p></o:p>

<o:p> </o:p>

MemoryStream ms = new MemoryStream(Data);<o:p></o:p>

<o:p> </o:p>

// Sents the file to browser.<o:p></o:p>

Response.ContentType = “application/vnd.ms-excel”;<o:p></o:p>

<o:p> </o:p>

//Adds header.<o:p></o:p>

Response.AddHeader(“content-disposition”, “inline; filename=MyBook.xls”);<o:p></o:p>

<o:p> </o:p>

// Writes file content to the response stream.<o:p></o:p>

Response.BinaryWrite(ms.ToArray());<o:p></o:p>

<o:p> </o:p>

Response.End();


Hi Babar,

I found a workaround, and it works for my proejct.

What I wanted was after item (Export Excel) is selected, export or save data, then dropdown posts back.

I still don't understand what's going on behind the scenes, HttpResponse, and etc.

So what I did is simple, I do use the same code for generating excel, save workbook in the session and create a new page for this line of code "workbook.Save(...)".

I know there must be better solutions, for now I am good with this solution.

Thanks for your help!

Anna

Hi Anna,


Good to know that you found some solution to this dilemma and thanks for sharing it with us. I will certainly try this solution and let you know my results.